(self.webpackChunktrello_client=self.webpackChunktrello_client||[]).push([[70128],{"./node_modules/@atlaskit/atlassian-context/dist/esm/common/constants/index.js":(e,t,r)=>{"use strict";r.d(t,{Cj:()=>o,IJ:()=>l,e3:()=>a,hu:()=>i,jq:()=>n,wx:()=>s});var s="fedramp-moderate",n="commercial",i="fedramp-fedex",o="stg",a="prod",l="dev"},"./node_modules/@atlaskit/atlassian-context/dist/esm/services/is-fedramp/index.js":(e,t,r)=>{"use strict";r.d(t,{E:()=>n});var s=r("./node_modules/@atlaskit/atlassian-context/dist/esm/common/constants/index.js");function n(){var e,t=globalThis,r=t.MICROS_PERIMETER||t.UNSAFE_ATL_CONTEXT_BOUNDARY;if(r)return r===s.wx;var n=null===(e=t.location)||void 0===e||null===(e=e.hostname)||void 0===e?void 0:e.match(/atlassian-us-gov-mod\.(com|net)|atlassian-us-gov\.(com|net)|atlassian-fex\.(com|net)|atlassian-stg-fedm\.(com|net)/);return!!n&&n.length>0}},"./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/FeatureGates.js":(e,t,r)=>{"use strict";r.d(t,{Ay:()=>ee});var s=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),n=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),a=r("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),l=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),c=r("./node_modules/@babel/runtime/regenerator/index.js"),u=r.n(c),d=r("./node_modules/@statsig/js-client/src/index.js"),h=r("./node_modules/eventemitter2/lib/eventemitter2.js");function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function m(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(t)return"/gateway/api/flags";if(r===_.cd.FEDRAMP_MODERATE)switch(e){case _.jQ.Production:return"https://api.atlassian-us-gov-mod.com/flags";case _.jQ.Staging:return"https://api.stg.atlassian-us-gov-mod.com/flags";default:throw Error('Invalid environment "'.concat(e,'" for "').concat(r,'" perimeter'))}else if(r===_.cd.COMMERCIAL)switch(e){case _.jQ.Development:return"https://api.dev.atlassian.com/flags";case _.jQ.Staging:return"https://api.stg.atlassian.com/flags";default:return"https://api.atlassian.com/flags"}else throw Error('Invalid perimeter "'.concat(r,'"'))}},{key:"fetchRequest",value:(a=(0,l.A)(u().mark(function e(t,r,s,n){var o,a,l,d,h;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=c.getBaseUrl(s.environment,s.useGatewayURL,s.perimeter),a=s.fetchTimeoutMs||5e3,AbortSignal.timeout?l=AbortSignal.timeout(a):AbortController&&(l=(d=new AbortController).signal,setTimeout(function(){return d.abort()},a)),e.next=5,fetch("".concat(o).concat(t),function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,s=Array(t);r=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(i);try{for(o.s();!(s=o.n()).done;){var a=s.value,l=(0,R._DJB2)(a);i.has(l)&&delete n[l]}}catch(e){o.e(e)}finally{o.f()}}this.applyOverrides(e)}},{key:"saveOverrides",value:function(){try{window.localStorage.setItem(this._localStorageKey,JSON.stringify(this._overrides))}catch(e){}}},{key:"getOverrides",value:function(){return this.mergeOverrides(this._overrides)}},{key:"applyOverrides",value:function(e){var t=N(N({},B()),e);this._djb2Map.clear();for(var r=0,s=Object.entries(t);r0&&void 0!==arguments[0]?arguments[0]:{},n=r.localStorageKey,o=r.overrideAdapter;(0,s.A)(this,e),(0,i.A)(this,"initPromise",null),(0,i.A)(this,"initCompleted",!1),(0,i.A)(this,"initWithDefaults",!1),(0,i.A)(this,"hasCheckGateErrorOccurred",!1),(0,i.A)(this,"hasGetExperimentErrorOccurred",!1),(0,i.A)(this,"hasGetExperimentValueErrorOccurred",!1),(0,i.A)(this,"hasGetLayerErrorOccurred",!1),(0,i.A)(this,"hasGetLayerValueErrorOccurred",!1),(0,i.A)(this,"subscriptions",new g),(0,i.A)(this,"dataAdapter",new D),(0,i.A)(this,"statsigValuesUpdated",function(){t.user&&t.statsigClient.updateUserSync(t.user,{disableBackgroundCacheRefresh:!0}),t.subscriptions.anyUpdated()}),this.overrideAdapter=o||new K(void 0===n?"STATSIG_OVERRIDES":n)},[{key:"initialize",value:(e=(0,l.A)(u().mark(function e(t,r,s){var n,i,o=this;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,G.vd)(t),!this.initPromise){e.next=4;break}return(0,G.Gh)(n,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return i=performance.now(),this.initOptions=n,this.initPromise=this.init(n,r,s).then(function(){o.initCompleted=!0,o.initWithDefaults=!0}).finally(function(){var e=performance.now()-i;o.fireClientEvent(i,e,"initialize",o.initCompleted,n.apiKey)}),e.abrupt("return",this.initPromise);case 8:case"end":return e.stop()}},e,this)})),function(t,r,s){return e.apply(this,arguments)})},{key:"initializeWithProvider",value:(t=(0,l.A)(u().mark(function e(t,r,s,n){var i,o,a=this;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(0,G.vd)(t),!this.initPromise){e.next=4;break}return(0,G.Gh)(i,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 4:return o=performance.now(),this.initOptions=i,this.provider=r,this.provider.setClientVersion(w.f),this.provider.setApplyUpdateCallback&&this.provider.setApplyUpdateCallback(this.applyUpdateCallback.bind(this)),this.initPromise=this.initWithProvider(i,r,s,n).then(function(){a.initCompleted=!0,a.initWithDefaults=!0}).finally(function(){var e=performance.now()-o;a.fireClientEvent(o,e,"initializeWithProvider",a.initCompleted,r.getApiKey?r.getApiKey():void 0)}),e.abrupt("return",this.initPromise);case 11:case"end":return e.stop()}},e,this)})),function(e,r,s,n){return t.apply(this,arguments)})},{key:"applyUpdateCallback",value:function(e){try{(this.initCompleted||this.initWithDefaults)&&(this.assertInitialized(this.statsigClient),this.dataAdapter.setBootstrapData(e.experimentValues),this.dataAdapter.setData(JSON.stringify(e.experimentValues)),this.statsigValuesUpdated())}catch(e){console.warn("Error when attempting to apply update",e)}}},{key:"fireClientEvent",value:function(e,t,r,s){var n,i=this,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;null===(n=this.initOptions.analyticsWebClient)||void 0===n||n.then(function(n){var a=W({targetApp:i.initOptions.targetApp,clientVersion:w.f,success:s,startTime:e,totalTime:t},o&&{apiKey:o});n.sendOperationalEvent({action:r,actionSubject:"featureGatesClient",attributes:a,tags:["measurement"],source:"@atlaskit/feature-gate-js-client"})}).catch(function(e){i.initOptions.environment!==_.jQ.Production&&console.error("Analytics web client promise did not resolve",e)})}},{key:"initializeFromValues",value:(r=(0,l.A)(u().mark(function e(t,r,s){var n,i,o,a=this,l=arguments;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>3&&void 0!==l[3]?l[3]:{},i=(0,G.vd)(t),!this.initPromise){e.next=5;break}return(0,G.Gh)(i,this.initOptions)||console.warn("Feature Gates client already initialized with different options. New options were not applied."),e.abrupt("return",this.initPromise);case 5:return Object.prototype.hasOwnProperty.call(n,"has_updates")||(n.has_updates=!0),o=performance.now(),this.initOptions=i,this.initPromise=this.initFromValues(i,r,s,n).then(function(){a.initCompleted=!0,a.initWithDefaults=!0}).finally(function(){var e=performance.now()-o;a.fireClientEvent(o,e,"initializeFromValues",a.initCompleted)}),e.abrupt("return",this.initPromise);case 10:case"end":return e.stop()}},e,this)})),function(e,t,s){return r.apply(this,arguments)})},{key:"assertInitialized",value:function(e){if(!e)throw Error("Client must be initialized before using this method")}},{key:"updateUser",value:(c=(0,l.A)(u().mark(function e(t,r,s){var n,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),n=(0,G.vd)(t),i=function(){return I.fetchExperimentValues(n,r,s).then(function(e){return{experimentValues:e.experimentValues,customAttributesFromFetch:e.customAttributes}})},e.next=5,this.updateUserUsingInitializeValuesProducer(i,r,s);case 5:case"end":return e.stop()}},e,this)})),function(e,t,r){return c.apply(this,arguments)})},{key:"updateUserWithProvider",value:(h=(0,l.A)(u().mark(function e(t,r){var s=this;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.provider){e.next=3;break}throw Error("Cannot update user using provider as the client was not initialised with a provider");case 3:return e.next=5,this.provider.setProfile(this.initOptions,t,r);case 5:return e.next=7,this.updateUserUsingInitializeValuesProducer(function(){return s.provider.getExperimentValues()},t,r);case 7:case"end":return e.stop()}},e,this)})),function(e,t){return h.apply(this,arguments)})},{key:"updateUserWithValues",value:(p=(0,l.A)(u().mark(function e(t,r){var s,n,i=arguments;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=i.length>2&&void 0!==i[2]?i[2]:{},this.assertInitialized(this.statsigClient),n=function(){return Promise.resolve({experimentValues:s,customAttributesFromFetch:r})},e.next=5,this.updateUserUsingInitializeValuesProducer(n,t,r);case 5:case"end":return e.stop()}},e,this)})),function(e,t){return p.apply(this,arguments)})},{key:"initializeCalled",value:function(){return null!=this.initPromise}},{key:"initializeCompleted",value:function(){return this.initCompleted}},{key:"checkGate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireGateExposure;return this.statsigClient.checkGate(e,{disableExposureLog:!(void 0===r||r)})}catch(t){return this.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate. Only the first occurrence of this error is logged.",gateName:e,error:t}),this.hasCheckGateErrorOccurred=!0),!1}}},{key:"isGateExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getFeatureGate(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check FeatureGate: ".concat(e)),!0}}},{key:"isExperimentExist",value:function(e){try{return this.assertInitialized(this.statsigClient),!this.statsigClient.getExperiment(e,{disableExposureLog:!0}).details.reason.includes("Unrecognized")}catch(e){return console.error("Error occurred when trying to check Experiment: ".concat(e)),!0}}},{key:"manuallyLogGateExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.checkGate(e)}},{key:"getExperiment",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireExperimentExposure;return y.i.fromExperiment(this.statsigClient.getExperiment(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetExperimentErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment. Only the first occurrence of this error is logged.",experimentName:e,error:t}),this.hasGetExperimentErrorOccurred=!0),new y.i(e,{},"",{time:Date.now(),reason:b.f.Error})}}},{key:"getExperimentValue",value:function(e,t,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=this.getExperiment(e,s);try{var i=s.typeGuard;return n.get(t,r,i)}catch(t){return this.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:s,error:t}),this.hasGetExperimentValueErrorOccurred=!0),r}}},{key:"manuallyLogExperimentExposure",value:function(e){this.assertInitialized(this.statsigClient),this.statsigClient.getExperiment(e)}},{key:"manuallyLogLayerExposure",value:function(e,t){var r;this.assertInitialized(this.statsigClient),null===(r=this.statsigClient.getLayer(e))||void 0===r||r.get(t)}},{key:"shutdownStatsig",value:function(){this.assertInitialized(this.statsigClient),this.statsigClient.shutdown()}},{key:"overrideGate",value:function(e,t){if(this.overrideAdapter.overrideGate(e,t),this.user){var r;null===(r=this.statsigClient)||void 0===r||r.updateUserSync(this.user,{disableBackgroundCacheRefresh:!0})}this.statsigValuesUpdated()}},{key:"clearGateOverride",value:function(e){this.overrideAdapter.removeGateOverride(e),this.statsigValuesUpdated()}},{key:"overrideConfig",value:function(e,t){this.overrideAdapter.overrideDynamicConfig(e,t),this.statsigValuesUpdated()}},{key:"clearConfigOverride",value:function(e){this.overrideAdapter.removeDynamicConfigOverride(e),this.statsigValuesUpdated()}},{key:"setOverrides",value:function(e){this.overrideAdapter.setOverrides(e),this.statsigValuesUpdated()}},{key:"getOverrides",value:function(){return this.overrideAdapter.getOverrides()}},{key:"clearAllOverrides",value:function(){this.overrideAdapter.removeAllOverrides(),this.statsigValuesUpdated()}},{key:"isCurrentUser",value:function(e,t){return(0,G.Gh)(this.currentIdentifiers,e)&&(0,G.Gh)(this.currentAttributes,t)}},{key:"onGateUpdated",value:function(e,t){var r=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.subscriptions.onGateUpdated(e,function(n){var i=s.fireGateExposure;(void 0===i||i)&&r.manuallyLogGateExposure(e);try{t(n)}catch(t){console.warn("Error calling callback for gate ".concat(e," with value ").concat(n),t)}},this.checkGate.bind(this),s)}},{key:"onExperimentValueUpdated",value:function(e,t,r,s){var n=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return this.subscriptions.onExperimentValueUpdated(e,t,r,function(t){var r=i.fireExperimentExposure;(void 0===r||r)&&n.manuallyLogExperimentExposure(e);try{s(t)}catch(r){console.warn("Error calling callback for experiment ".concat(e," with value ").concat(t),r)}},this.getExperimentValue.bind(this),i)}},{key:"onAnyUpdated",value:function(e){return this.subscriptions.onAnyUpdated(e)}},{key:"init",value:(m=(0,l.A)(u().mark(function e(t,r,s){var n,i,o,l,c,d,h;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=W({},t),e.prev=1,l=I.fetchClientSdk(t).then(function(e){return n.sdkKey=e.clientSdkKey}),c=I.fetchExperimentValues(t,r,s),e.next=6,Promise.all([l,c]);case 6:d=e.sent,i=(h=(0,a.A)(d,2)[1]).experimentValues,o=h.customAttributes,e.next=20;break;case 13:return e.prev=13,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=19,this.initFromValues(n,r,s);case 19:throw e.t0;case 20:return e.abrupt("return",this.initFromValues(n,r,o,i));case 21:case"end":return e.stop()}},e,this,[[1,13]])})),function(e,t,r){return m.apply(this,arguments)})},{key:"initWithProvider",value:(f=(0,l.A)(u().mark(function e(t,r,s,n){var i,o,l,c,d,h,p;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=W(W({},t),{},{disableCurrentPageLogging:!0}),e.prev=1,e.next=4,r.setProfile(t,s,n);case 4:return c=r.getClientSdkKey().then(function(e){return i.sdkKey=e}),d=r.getExperimentValues(),e.next=8,Promise.all([c,d]);case 8:h=e.sent,o=(p=(0,a.A)(h,2)[1]).experimentValues,l=p.customAttributesFromFetch,e.next=22;break;case 15:return e.prev=15,e.t0=e.catch(1),e.t0 instanceof Error&&console.error("Error occurred when trying to fetch the Feature Gates client values, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client without values"),e.next=21,this.initFromValues(i,s,n);case 21:throw e.t0;case 22:return e.abrupt("return",this.initFromValues(i,s,l,o));case 23:case"end":return e.stop()}},e,this,[[1,15]])})),function(e,t,r,s){return f.apply(this,arguments)})},{key:"initFromValues",value:(C=(0,l.A)(u().mark(function e(t,r,s){var n,i,a,l,c,h,p,m=arguments;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=m.length>3&&void 0!==m[3]?m[3]:{},this.overrideAdapter.initFromStoredOverrides(),this.currentIdentifiers=r,this.currentAttributes=s,(a=(0,G.M1)(t)).sdkKey||(a.sdkKey=q),null!==(n=a.networkConfig)&&void 0!==n&&n.logEventUrl||(a.networkConfig=W(W({},a.networkConfig),{},{logEventUrl:"https://xp.atlassian.com/v1/rgstr"})),a.perimeter===_.cd.FEDRAMP_MODERATE&&(a.disableLogging=!0),l=a.sdkKey,c=a.environment,a.updateUserCompletionCallback,a.perimeter,h=(0,o.A)(a,$),this.sdkKey=l,this.user=(0,G.OA)(r,s,this.sdkKey),p=W(W({},h),{},{environment:{tier:c},includeCurrentPageUrlWithEvents:!1,dataAdapter:this.dataAdapter,overrideAdapter:this.overrideAdapter}),e.prev=12,this.statsigClient=new d.StatsigClient(l,this.user,p),this.dataAdapter.setBootstrapData(i),e.next=17,this.statsigClient.initializeAsync();case 17:e.next=29;break;case 19:return e.prev=19,e.t0=e.catch(12),e.t0 instanceof Error&&console.error("Error occurred when trying to initialise the Statsig client, error: ".concat(null===e.t0||void 0===e.t0?void 0:e.t0.message)),console.warn("Initialising Statsig client with default sdk key and without values"),this.statsigClient=new d.StatsigClient(q,this.user,p),this.dataAdapter.setBootstrapData(),e.next=27,this.statsigClient.initializeAsync();case 27:throw this.initWithDefaults=!0,e.t0;case 29:case"end":return e.stop()}},e,this,[[12,19]])})),function(e,t,r){return C.apply(this,arguments)})},{key:"updateUserUsingInitializeValuesProducer",value:(O=(0,l.A)(u().mark(function e(t,r,s){var n,i,o,a=this;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.assertInitialized(this.statsigClient),this.initPromise){e.next=3;break}throw Error("The client must be initialized before you can update the user.");case 3:if(!this.isCurrentUser(r,s)){e.next=5;break}return e.abrupt("return",this.initPromise);case 5:return n=this.initPromise,e.prev=6,e.next=9,this.initPromise;case 9:e.next=13;break;case 11:e.prev=11,e.t0=e.catch(6);case 13:return i=t(),o=this.updateStatsigClientUser(i,r,s),this.initPromise=o.catch((0,l.A)(u().mark(function e(){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a.initPromise=n,!a.provider){e.next=4;break}return e.next=4,a.provider.setProfile(a.initOptions,a.currentIdentifiers,a.currentAttributes);case 4:case"end":return e.stop()}},e)}))),e.abrupt("return",o);case 17:case"end":return e.stop()}},e,this,[[6,11]])})),function(e,t,r){return O.apply(this,arguments)})},{key:"updateStatsigClientUser",value:(k=(0,l.A)(u().mark(function e(t,r,s){var n,i,o,a,l,c,d,h,p;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.assertInitialized(this.statsigClient),e.prev=1,e.next=4,t;case 4:o=e.sent,a=(0,G.OA)(r,o.customAttributesFromFetch,this.sdkKey),e.next=13;break;case 8:throw e.prev=8,e.t0=e.catch(1),d=e.t0 instanceof Error?e.t0.message:JSON.stringify(e.t0),null===(l=(c=this.initOptions).updateUserCompletionCallback)||void 0===l||l.call(c,!1,d),e.t0;case 13:return h=!0,p=null,e.prev=15,this.dataAdapter.setBootstrapData(o.experimentValues),this.user=a,e.next=20,this.statsigClient.updateUserAsync(this.user);case 20:e.next=26;break;case 22:e.prev=22,e.t1=e.catch(15),h=!1,p=String(e.t1);case 26:if(null===(n=this.initOptions)||void 0===n||null===(i=n.updateUserCompletionCallback)||void 0===i||i.call(n,h,p),!h){e.next=33;break}this.currentIdentifiers=r,this.currentAttributes=s,this.subscriptions.anyUpdated(),e.next=34;break;case 33:throw Error("Failed to update user. An unexpected error occured.");case 34:case"end":return e.stop()}},e,this,[[1,8],[15,22]])})),function(e,t,r){return k.apply(this,arguments)})},{key:"getPackageVersion",value:function(){return w.f}},{key:"getLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{this.assertInitialized(this.statsigClient);var r=t.fireLayerExposure;return v.W.fromLayer(this.statsigClient.getLayer(e,{disableExposureLog:!(void 0===r||r)}))}catch(t){return this.hasGetLayerErrorOccurred||(console.warn({msg:"An error has occurred getting the layer. Only the first occurrence of this error is logged.",layerName:e,error:t}),this.hasGetLayerErrorOccurred=!0),v.W.fromLayer((0,d._makeLayer)(e,{reason:"Error"},null))}}},{key:"getLayerValue",value:function(e,t,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=this.getLayer(e,s);try{var i=s.typeGuard;return n.get(t,r,i)}catch(t){return this.hasGetLayerValueErrorOccurred||(console.warn({msg:"An error has occurred getting the layer value. Only the first occurrence of this error is logged.",layerName:e,defaultValue:r,options:s,error:t}),this.hasGetLayerValueErrorOccurred=!0),r}}}])}(),J=(0,n.A)(function e(){(0,s.A)(this,e)},null,[{key:"isGateExists",value:function(e){return this.client.isGateExist(e)}},{key:"isExperimentExists",value:function(e){return this.client.isExperimentExist(e)}}]);(0,i.A)(J,"client",new H),(0,i.A)(J,"hasCheckGateErrorOccurred",!1),(0,i.A)(J,"hasGetExperimentValueErrorOccurred",!1),(0,i.A)(J,"checkGate",function(e,t){try{if("undefined"!=typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getFeatureFlagOverride){var r=window.__CRITERION__.getFeatureFlagOverride(e);if(void 0!==r)return r}}catch(t){J.hasCheckGateErrorOccurred||(console.warn({msg:"An error has occurred checking the feature gate from criterion override. Only the first occurrence of this error is logged.",gateName:e,error:t}),J.hasCheckGateErrorOccurred=!0)}return J.client.checkGate(e,t)}),(0,i.A)(J,"getExperimentValue",function(e,t,r,s){try{if("undefined"!=typeof window&&window.__CRITERION__&&"function"==typeof window.__CRITERION__.getExperimentValueOverride){var n=window.__CRITERION__.getExperimentValueOverride(e,t);if(null!=n)return n}}catch(t){return J.hasGetExperimentValueErrorOccurred||(console.warn({msg:"An error has occurred getting the experiment value from criterion override. Only the first occurrence of this error is logged.",experimentName:e,defaultValue:r,options:s,error:t}),J.hasGetExperimentValueErrorOccurred=!0),r}return J.client.getExperimentValue(e,t,r,s)}),(0,i.A)(J,"initializeCalled",J.client.initializeCalled.bind(J.client)),(0,i.A)(J,"initializeCompleted",J.client.initializeCompleted.bind(J.client)),(0,i.A)(J,"initialize",J.client.initialize.bind(J.client)),(0,i.A)(J,"initializeWithProvider",J.client.initializeWithProvider.bind(J.client)),(0,i.A)(J,"initializeFromValues",J.client.initializeFromValues.bind(J.client)),(0,i.A)(J,"manuallyLogGateExposure",J.client.manuallyLogGateExposure.bind(J.client)),(0,i.A)(J,"getExperiment",J.client.getExperiment.bind(J.client)),(0,i.A)(J,"manuallyLogExperimentExposure",J.client.manuallyLogExperimentExposure.bind(J.client)),(0,i.A)(J,"manuallyLogLayerExposure",J.client.manuallyLogLayerExposure.bind(J.client)),(0,i.A)(J,"shutdownStatsig",J.client.shutdownStatsig.bind(J.client)),(0,i.A)(J,"overrideGate",J.client.overrideGate.bind(J.client)),(0,i.A)(J,"clearGateOverride",J.client.clearGateOverride.bind(J.client)),(0,i.A)(J,"overrideConfig",J.client.overrideConfig.bind(J.client)),(0,i.A)(J,"clearConfigOverride",J.client.clearConfigOverride.bind(J.client)),(0,i.A)(J,"setOverrides",J.client.setOverrides.bind(J.client)),(0,i.A)(J,"getOverrides",J.client.getOverrides.bind(J.client)),(0,i.A)(J,"clearAllOverrides",J.client.clearAllOverrides.bind(J.client)),(0,i.A)(J,"isCurrentUser",J.client.isCurrentUser.bind(J.client)),(0,i.A)(J,"onGateUpdated",J.client.onGateUpdated.bind(J.client)),(0,i.A)(J,"onExperimentValueUpdated",J.client.onExperimentValueUpdated.bind(J.client)),(0,i.A)(J,"onAnyUpdated",J.client.onAnyUpdated.bind(J.client)),(0,i.A)(J,"updateUser",J.client.updateUser.bind(J.client)),(0,i.A)(J,"updateUserWithProvider",J.client.updateUserWithProvider.bind(J.client)),(0,i.A)(J,"updateUserWithValues",J.client.updateUserWithValues.bind(J.client)),(0,i.A)(J,"getPackageVersion",J.client.getPackageVersion.bind(J.client)),(0,i.A)(J,"getLayer",J.client.getLayer.bind(J.client)),(0,i.A)(J,"getLayerValue",J.client.getLayerValue.bind(J.client));var Q=J;if("undefined"!=typeof window){if(void 0===window.__FEATUREGATES_JS__)window.__FEATUREGATES_JS__=J;else{var Y,X,Z=(null===(Y=Q=window.__FEATUREGATES_JS__)||void 0===Y||null===(X=Y.getPackageVersion)||void 0===X?void 0:X.call(Y))||"4.10.0 or earlier";Z!==w.f&&console.warn("Multiple versions of FeatureGateClients found on the current page.\n The currently bound version is ".concat(Z," when module version ").concat(w.f," was loading."))}}let ee=Q},"./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/compat/DynamicConfig.js":(e,t,r)=>{"use strict";r.d(t,{i:()=>a});var s=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),n=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/utils.js"),a=function(){function e(t,r,s,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;(0,n.A)(this,e),this.value=r,this._name=t,this._ruleID=s,this._secondaryExposures=o,this._allocatedExperimentName=a,this._evaluationDetails=i,this._onDefaultValueFallback=l}return(0,i.A)(e,[{key:"get",value:function(e,t,r){var n,i,o=this.getValue(e,t);if(null==o)return t;var a=Array.isArray(t)?"array":(0,s.A)(t),l=Array.isArray(o)?"array":(0,s.A)(o);return r?r(o)?(this.fireExposure(e),o):(null===(i=this._onDefaultValueFallback)||void 0===i||i.call(this,this,e,a,l),t):null==t||a===l?(this.fireExposure(e),o):(null===(n=this._onDefaultValueFallback)||void 0===n||n.call(this,this,e,a,l),t)}},{key:"getValue",value:function(e,t){return null==e?this.value:(null==t&&(t=null),null==this.value[e])?t:(this.fireExposure(e),this.value[e])}},{key:"fireExposure",value:function(e){this.experiment&&this.experiment.get(e)}}],[{key:"fromExperiment",value:function(t){var r,s,n=new e(t.name,t.value,t.ruleID,(0,o.MW)(t.details),null===(r=t.__evaluation)||void 0===r?void 0:r.secondary_exposures,null!==(s=t.groupName)&&void 0!==s?s:void 0);return n.experiment=t,n}}])}()},"./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/compat/Layer.js":(e,t,r)=>{"use strict";r.d(t,{W:()=>a});var s=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),n=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/utils.js"),a=function(){function e(t,r,s,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[];(0,n.A)(this,e),this._logParameterFunction=o,this._name=t,this._value=JSON.parse(JSON.stringify(null!=r?r:{})),this._ruleID=null!=s?s:"",this._evaluationDetails=i,this._secondaryExposures=a,this._undelegatedSecondaryExposures=l,this._allocatedExperimentName=c,this._explicitParameters=u}return(0,i.A)(e,[{key:"get",value:function(e,t,r){var n=this,i=this._value[e];if(null==i)return t;var o=function(){return n._logLayerParameterExposure(e),i};return r?r(i)?o():t:null==t||(0,s.A)(i)===(0,s.A)(t)&&Array.isArray(t)===Array.isArray(i)?o():t}},{key:"getValue",value:function(e,t){void 0==t&&(t=null);var r=this._value[e];return null!=r&&this._logLayerParameterExposure(e),null!=r?r:t}},{key:"_logLayerParameterExposure",value:function(e){var t;null===(t=this._logParameterFunction)||void 0===t||t.call(this,this,e)}}],[{key:"fromLayer",value:function(t){var r,s,n,i;return new e(t.name,t.__value,t.ruleID,(0,o.MW)(t.details),function(e,r){return t.get(r)},null===(r=t.__evaluation)||void 0===r?void 0:r.secondary_exposures,null===(s=t.__evaluation)||void 0===s?void 0:s.undelegated_secondary_exposures,null===(n=t.__evaluation)||void 0===n?void 0:n.allocated_experiment_name,null===(i=t.__evaluation)||void 0===i?void 0:i.explicit_parameters)}}])}()},"./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/compat/types.js":(e,t,r)=>{"use strict";r.d(t,{f:()=>s});var s=function(e){return e.Error="Error",e.LocalOverride="LocalOverride",e.Unrecognized="Unrecognized",e.Uninitialized="Uninitialized",e.NetworkNotModified="NetworkNotModified",e.Network="Network",e.InvalidBootstrap="InvalidBootstrap",e.Bootstrap="Bootstrap",e.Cache="Cache",e.Unknown="Unknown",e}({})},"./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/types.js":(e,t,r)=>{"use strict";r.d(t,{cd:()=>n,jQ:()=>s});var s=function(e){return e.Development="development",e.Staging="staging",e.Production="production",e}({}),n=function(e){return e.COMMERCIAL="commercial",e.FEDRAMP_MODERATE="fedramp-moderate",e}({})},"./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/utils.js":(e,t,r)=>{"use strict";r.d(t,{Gh:()=>m,M1:()=>g,MW:()=>v,OA:()=>f,vd:()=>p});var s=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),n=r("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@statsig/js-client/src/index.js"),a=r("./node_modules/@atlaskit/atlassian-context/dist/esm/services/is-fedramp/index.js"),l=r("./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/compat/types.js"),c=r("./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/types.js"),u=["api","disableCurrentPageLogging","loggingIntervalMillis","loggingBufferMaxSize","localMode","eventLoggingApi","eventLoggingApiForRetries","disableLocalStorage","ignoreWindowUndefined","disableAllLogging","initTimeoutMs","disableNetworkKeepalive","overrideStableID","disableErrorLogging","disableAutoMetricsLogging"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function h(e){for(var t=1;t{"use strict";r.d(t,{f:()=>s});var s="5.3.0"},"./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js":(e,t,r)=>{"use strict";r.d(t,{fg:()=>g,D:()=>f});var s,n,i=r("./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/FeatureGates.js"),o=!((null==globalThis||null===(s=globalThis.process)||void 0===s||null===(s=s.env)||void 0===s?void 0:s.JEST_WORKER_ID)!==void 0)&&(null==globalThis||null===(n=globalThis.process)||void 0===n||null===(n=n.env)||void 0===n?void 0:n.NODE_ENV)!=="production",a=function(){var e;o&&(e=console).debug.apply(e,arguments)},l=r("./node_modules/process/browser.js"),c="__PLATFORM_FEATURE_FLAGS__",u=void 0!==l&&void 0!==l.env,d=!!u&&"true"===l.env.ENABLE_PLATFORM_FF,h=!!u&&"true"===l.env.STORYBOOK_ENABLE_PLATFORM_FF,p=d||h,m="undefined"!=typeof window?window:globalThis;function f(e){m[c].booleanResolver=e}function g(e){return function(e){if(p)return a('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',"@atlaskit/platform-feature-flags",e),!0;try{if((null===(t=m[c])||void 0===t?void 0:t.booleanResolver)===void 0||(null===(r=m[c])||void 0===r?void 0:r.booleanResolver)===null)return i.Ay.checkGate(e);var t,r,s,n=null===(s=m[c])||void 0===s?void 0:s.booleanResolver(e);if("boolean"!=typeof n)return console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1;return n}catch(e){return!1}}(e)}m[c]=m[c]||{booleanResolver:void 0}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js":(e,t,r)=>{"use strict";r.d(t,{IC:()=>T,vr:()=>P,ff:()=>R,oG:()=>L,rY:()=>D});var s,n,i=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=r("./node_modules/@atlassiansox/analytics-web-client/dist/esm/analyticsWebTypes.js"),a=r("./node_modules/@atlassiansox/analytics-web-client/dist/esm/analyticsWebClient.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),u=r("./node_modules/process/browser.js"),d=null!==(s=null==u?void 0:u.env._PACKAGE_NAME_)&&void 0!==s?s:"",h=null!==(n=null==u?void 0:u.env._PACKAGE_VERSION_)&&void 0!==n?n:"",p=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),m=r("./node_modules/@babel/runtime/regenerator/index.js"),f=r.n(m),g=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),y=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),v=new((0,r("./node_modules/@babel/runtime/helpers/esm/createClass.js").A)(function e(){(0,y.A)(this,e)},[{key:"cachedSamplingConfig",get:function(){return this.cache},set:function(e){this.cache=e}}])),b=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js"),_={usedGetCookie:1e5,usedGetCookieError:1,usedSetCookie:1e3,usedSetCookieError:1,usedSetStrictlyNecessaryCookie:1e4,usedSetStrictlyNecessaryCookieError:1,usedDeleteCookie:10,usedDeleteCookieError:1,usedCheckThirdParty:1e5,checkThirdPartyError:1,usedDocumentCookie:100,usedDocumentCookieError:1,initializeControlsError:1,loadStorageControlsError:1,updatePreferencesError:1,fetchConsentPreferencesError:1,saveConsentPreferencesError:1,usedAtlBrowserStorageGetItem:100,usedAtlBrowserStorageGetItemError:1,usedAtlBrowserStorageSetItem:100,usedAtlBrowserStorageSetItemError:1,usedAtlBrowserStorageSetStrictlyNecessaryItem:100,usedAtlBrowserStorageSetStrictlyNecessaryItemError:1,usedCheckIfSetByPackageError:1,renderConsentBannerError:1,bannerAppearanceAfterDismissal:1},w=["loadStorageControlsError"];function C(){return(C=(0,p.A)(f().mark(function e(){var t,r,s;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!v.cachedSamplingConfig){e.next=2;break}return e.abrupt("return",v.cachedSamplingConfig);case 2:if(!(0,b.f)()){e.next=4;break}return e.abrupt("return",void 0);case 4:return t=(0,l.re)().loadCache,e.next=7,t(g.kU.Cookies);case 7:return s=null==(r=e.sent)?void 0:r.analyticsSamplingRatio,v.cachedSamplingConfig=s,e.abrupt("return",s);case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function O(){return(O=(0,p.A)(f().mark(function e(t){var r,s,n;return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!w.includes(t)){e.next=2;break}return e.abrupt("return",_[t]);case 2:return e.next=4,function(){return C.apply(this,arguments)}();case 4:return n=(null==(s=null!=(r=e.sent)?r:_)?void 0:s[t])!==void 0?s[t]:_[t],e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(){return(k=(0,p.A)(f().mark(function e(t,r){return f().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,function(e){return O.apply(this,arguments)}(t);case 2:Math.floor(Math.random()*e.sent)||r();case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function S(e){for(var t=1;t{"use strict";r.d(t,{re:()=>E,B_:()=>S});var s,n,i,o,a,l,c,u,d,h=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),p=r("./node_modules/@babel/runtime/regenerator/index.js"),m=r.n(p),f=r("./node_modules/js-cookie/src/js.cookie.js"),g=r.n(f),y=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),v=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),b=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),_=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),w=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),C=function(){var e,t;return(0,_.A)(function e(t){switch((0,b.A)(this,e),t){case v.kU.Cookies:this.cacheUrl="https://atlassian-cookies--categories.us-east-1.prod.public.atl-paas.net/categories_COOKIE.json";break;case v.kU.LocalStorage:this.cacheUrl="https://atlassian-cookies--categories.us-east-1.prod.public.atl-paas.net/categories_LOCAL_STORAGE.json";break;case v.kU.SessionStorage:this.cacheUrl="https://atlassian-cookies--categories.us-east-1.prod.public.atl-paas.net/categories_SESSION_STORAGE.json";break;default:this.cacheUrl="https://atlassian-cookies--categories.us-east-1.prod.public.atl-paas.net/categories.json"}},[{key:"clearStorageControlsDataCache",value:function(){this.localResponseCache=void 0,this.localResponsePromiseCache=void 0,this.localResponseJsonPromiseCache=void 0}},{key:"handleCategoriesResponse",value:(e=(0,h.A)(m().mark(function e(t){var r;return m().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error("Failed to fetch Cookies Cache! Cached promise was undefined");case 2:return e.next=4,t;case 4:if((r=e.sent).ok){e.next=7;break}throw Error("Failed to fetch Cookies Cache! status: ".concat(r.status));case 7:return this.localResponseJsonPromiseCache=this.localResponseJsonPromiseCache||(null==r?void 0:r.json()),e.abrupt("return",this.localResponseJsonPromiseCache);case 9:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"loadStorageControlsData",value:(t=(0,h.A)(m().mark(function e(){return m().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.localResponseCache){e.next=4;break}return e.abrupt("return",this.localResponseCache);case 4:return e.prev=4,this.localResponsePromiseCache||(w.V.debug("Loading cache ".concat(this.cacheUrl)),this.localResponsePromiseCache=fetch(this.cacheUrl)),e.next=8,this.handleCategoriesResponse(this.localResponsePromiseCache);case 8:return this.localResponseCache=e.sent,e.abrupt("return",this.localResponseCache);case 12:e.prev=12,e.t0=e.catch(4),w.V.errorWithOperationalEvent({action:"loadStorageControlsError",message:e.t0.message||""}),this.clearStorageControlsDataCache();case 16:case"end":return e.stop()}},e,this,[[4,12]])})),function(){return t.apply(this,arguments)})}])}(),O=!1,k=function(){var e=(0,h.A)(m().mark(function e(t){var r,s,n;return m().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next=e.t0===v.kU.Cookies?3:e.t0===v.kU.LocalStorage?6:e.t0===v.kU.SessionStorage?9:12;break;case 3:return e.next=5,null===(r=c)||void 0===r?void 0:r.loadStorageControlsData();case 5:case 8:case 11:return e.abrupt("return",e.sent);case 6:return e.next=8,null===(s=u)||void 0===s?void 0:s.loadStorageControlsData();case 9:return e.next=11,null===(n=d)||void 0===n?void 0:n.loadStorageControlsData();case 12:return e.abrupt("return",void 0);case 13:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),E=function(){return{analyticsEnabled:null==s||s,product:n,webStorageEnabled:null!=i&&i,localConsentMode:null!=o&&o,packageDebugMode:a,allowUncategorizedCookiesInOverrides:null!=l&&l,cookiesCacheLoader:c,localStorageCacheLoader:u,sessionStorageCacheLoader:d,loadCache:k,hasInitialized:O}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.webStorageEnabled,r=e.allowUncategorizedCookiesInOverrides,h=e.localConsentMode,p=e.product,m=void 0===p?"all":p,f=e.analyticsEnabled;w.V.debug("Initialize global state invoked"),(!n||null==n||"all"===n)&&m&&(n=m),void 0!==t&&void 0===i&&(i=t&&!(0,y.fg)("platform_moonjelly_bsc_master_killswitch")&&!(0,y.fg)("platform_moonjelly_bsc_web_storage_killswitch")),void 0!==r&&void 0===l&&(l=r),O||(o=void 0!==h&&h,s=void 0===f||f,c=new C(v.kU.Cookies),u=new C(v.kU.LocalStorage),d=new C(v.kU.SessionStorage),(0,y.fg)("platform_moonjelly_bsc_debug_mode")&&(a=!!g().get("atl-bsc-debug-mode")),O=!0)}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/helpers.js":(e,t,r)=>{"use strict";r.d(t,{J:()=>n,l:()=>s});var s=function(e){return Number(e).toString()},n=function(e){if(e)return!!Number(e)}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js":(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var s=r("./node_modules/@atlassiansox/analytics-web-client/dist/esm/analyticsWebClient.js"),n=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),i=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),o=function(){var e="undefined"==typeof document||"undefined"==typeof window||!Document||!Document.prototype||!Object||!Object.defineProperty,t=!n.fg,r=!s.Ay;return e&&i.V.warn("Browser context is not available."),t&&i.V.warn("Platform Feature Flag library is not available"),s.Ay||i.V.warn("analytics-web-client is not available"),!!e||!!t||!!r}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/item-processing/index.js":(e,t,r)=>{"use strict";r.d(t,{XA:()=>g});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),i=r("./node_modules/@babel/runtime/regenerator/index.js"),o=r.n(i),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/preferences-controls/get-preferences/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function d(e){for(var t=1;t{"use strict";r.d(t,{V:()=>d});var s=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),n=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}var u="[browser-storage-controls]",d=(0,i.A)(function e(){(0,n.A)(this,e)},null,[{key:"info",value:function(e,t){console.log("".concat(u,": ").concat(e),t?JSON.stringify(t):"")}},{key:"error",value:function(e,t){console.error("".concat(u,": ").concat(e),t?JSON.stringify(t):"")}},{key:"errorWithOperationalEvent",value:function(e){var t=e.action,r=e.attributes,n=e.message,i=e.metadata;try{(0,a.vr)({action:t,attributes:function(e){for(var t=1;t{"use strict";r.d(t,{Ao:()=>f,Bk:()=>v,CK:()=>d,Iw:()=>p,OF:()=>a,PN:()=>h,bK:()=>u,bT:()=>l,dx:()=>g,gV:()=>m,oG:()=>y,sD:()=>b,vk:()=>c});var s=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),n=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js");function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function o(e){for(var t=1;t{"use strict";r.d(t,{H:()=>m});var s=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js"),n=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/helpers.js"),i=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/constants.js"),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/consent-hub-service/utils.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-cookie/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/transformer/index.js"),c=function(e){var t=(0,l.Eu)(e).isV002,r=e[8];return t&&(r="1"===e[7]?"0":"1"),r},u=function(e){if(e){var t=c(e),r=!(0,n.J)(t),s=!(0,o.gy)(e);if(r&&s)return!s;if(!r&&s)return!1}return!0},d=function(e){var t=e.consentToken,r=e.fallbackConsentToken,s=!!(0,o.gy)(t);return s?u(r):!(0,o.yl)(t)&&!!s||!r},h=function(e){if(e){var t=c(e),r=!(0,n.J)(t);if(!(0,o.gy)(e))return!!r}return!0},p=function(e){var t=e.consentToken,r=e.consentTimestamp,s=e.fallbackConsentToken;return(0,o.gy)(t)?h(s):r?(0,o.SA)(r):!s},m=function(e){var t=e.consentToken,r=e.consentTimestamp,o=e.fallbackConsentToken,l=(0,s.f)()?o:o||(0,a.R)(i.CK),u=c(t);return(0,n.J)(u)?p({consentToken:t,fallbackConsentToken:l,consentTimestamp:r}):d({consentToken:t,fallbackConsentToken:l})}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/delete-cookie/index.js":(e,t,r)=>{"use strict";r.d(t,{Y:()=>l});var s=r("./node_modules/js-cookie/src/js.cookie.js"),n=r.n(s),i=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),l=function(e,t){if((0,i.fg)("platform_moonjelly_bsc_master_killswitch"))n().remove(e,t);else try{(0,o.vr)({action:"usedDeleteCookie",attributes:{cookieKey:e}}),n().remove(e,t)}catch(t){a.V.errorWithOperationalEvent({action:"usedDeleteCookieError",attributes:{cookieKey:e},message:"Failed to use delete cookie. ".concat(t.message||"")})}}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-consent-token/utils.js":(e,t,r)=>{"use strict";r.d(t,{L:()=>u});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/regenerator/index.js"),i=r.n(n),o=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/constants.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/consent-hub-service/index.js"),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/transformer/index.js"),u=function(){var e=(0,s.A)(i().mark(function e(t){var r,s,n,u,d,h,p;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.fy)();case 2:return s=(r=e.sent).consentToken,n=r.consentTimestamp,u=r.consentHubInaccessible,(d=(0,c.Eu)(s).isValid)&&u&&(t?s=t:(0,o.fg)("platform_moonjelly_bsc_fallback_token_audit")?(h=a.sD,p=s.slice(3,7),s="".concat(h).concat(p).concat("111")):s="".concat(s.slice(0,8),"1111")),e.abrupt("return",d?{consentToken:s,consentTimestamp:n}:void 0);case 7:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-cookie/index.js":(e,t,r)=>{"use strict";r.d(t,{R:()=>l});var s=r("./node_modules/js-cookie/src/js.cookie.js"),n=r.n(s),i=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js");function l(e){if((0,i.fg)("platform_moonjelly_bsc_master_killswitch"))return e?n().get(e):n().get();try{return(0,o.vr)({action:"usedGetCookie",attributes:{cookieKey:e}}),e?n().get(e):n().get()}catch(t){a.V.errorWithOperationalEvent({action:"usedGetCookieError",attributes:{cookieKey:e},message:"Failed to use get cookie. ".concat(t.message||"")})}}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/initialize-controls/index.js":(e,t,r)=>{"use strict";r.d(t,{bX:()=>_});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/regenerator/index.js"),i=r.n(n),o=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js"),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),u=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),d=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/web-storage-service/types.js"),h=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/item-processing/index.js"),p=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),m=function(e){return function(t){var r=t.includes("atl-set-cookie");if(r)try{return e.apply(document,[t])}catch(e){a.V.errorWithOperationalEvent({action:"usedDocumentCookieError",message:"document.cookie setter failed to set cookie set by package. ".concat(e.message||""),attributes:{outsidePackage:!1}})}try{var s=t.slice(0,t.indexOf("="))||"";(0,c.vr)({action:"usedDocumentCookie",attributes:{cookieKey:s,outsidePackage:!r}});try{var n=(0,u.re)().product;(0,h.XA)({itemKey:s,allowedCallback:function(){return e.apply(document,[t])},blockedCallback:function(r){var s=r.itemHasCategory;return(0,u.re)().allowUncategorizedCookiesInOverrides&&!s?e.apply(document,[t]):void 0},storageType:p.kU.Cookies,productName:n})}catch(e){a.V.errorWithOperationalEvent({action:"usedDocumentCookieError",message:"Failed to set cookie. ".concat(e.message||""),attributes:{cookieKey:s}})}}catch(e){a.V.errorWithOperationalEvent({action:"usedDocumentCookieError",message:"Failed to send document.cookie setter event. ".concat(e.message||"")})}}},f=function(){var e=(0,s.A)(i().mark(function e(){var t,r,s;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==(t=Object.getOwnPropertyDescriptor(Document.prototype,"cookie"))?void 0:t.set,s=null==t?void 0:t.get,!(!r||!s)){e.next=6;break}return a.V.warn("No document.cookie capabilities found"),e.abrupt("return");case 6:Object.defineProperty(document,"cookie",{get:s,set:m(r),configurable:!0});case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),g=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/indexed-db-service/index.js"),y=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/web-storage-service/index.js"),v=function(e,t,r){return function(s,n){var i=e.storage,o=!1;if(e.checkIfSetByPackage({itemKey:s,isSetCallback:function(){o=!0},isNotSetCallback:function(){o=!1}}),o)try{return t.apply(i,[s,n])}catch(e){a.V.errorWithOperationalEvent({action:"usedAtlBrowserStorageSetItemError",message:"".concat(r," failed to setItem. ").concat(e.message||""),attributes:{outsidePackage:!1,storageType:r}})}try{(0,c.vr)({action:"usedAtlBrowserStorageSetItem",attributes:{itemKey:s,outsidePackage:!o,storageType:r}});try{var l=(0,u.re)().product;(0,h.XA)({itemKey:s,allowedCallback:function(){t.apply(i,[s,n])},blockedCallback:function(e){var r=e.itemHasCategory;(0,u.re)().allowUncategorizedCookiesInOverrides&&!r&&t.apply(i,[s,n])},storageType:r===d.E.LocalStorage?p.kU.LocalStorage:p.kU.SessionStorage,productName:l})}catch(e){a.V.errorWithOperationalEvent({action:"usedAtlBrowserStorageSetItemError",message:"Failed to set item. ".concat(e.message||""),attributes:{itemKey:s,storageType:r}})}}catch(e){a.V.errorWithOperationalEvent({action:"usedAtlBrowserStorageSetItemError",message:"Failed to send ".concat(r," setter event. ").concat(e.message||"")})}}},b=function(){var e=(0,s.A)(i().mark(function e(t){var r,s,n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((r=(0,y.wG)(t)).isAvailable){e.next=4;break}return a.V.warn("No ".concat(t," capabilities found")),e.abrupt("return");case 4:if(g.W.isAvailable){e.next=7;break}return a.V.warn("IndexedDB is not available"),e.abrupt("return");case 7:if(g.W.isBooted){e.next=10;break}return e.next=10,g.W.boot();case 10:s=r.storage.setItem,n={clear:r.clear.bind(r),key:r.key.bind(r),length:r.length.bind(r),removeItem:r.removeItem.bind(r),getItem:r.getItem.bind(r),setItem:v(r,s,t)},Object.defineProperty(window,t===d.E.LocalStorage?"localStorage":"sessionStorage",{value:n,writable:!0,configurable:!0});case 14:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=(0,s.A)(i().mark(function e(){var t,r,s=arguments;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=s.length>0&&void 0!==s[0]?s[0]:{analyticsEnabled:!0},!(0,o.fg)("platform_moonjelly_bsc_master_killswitch")){e.next=3;break}return e.abrupt("return");case 3:if(e.prev=3,a.V.debug("initializeControls invoked"),(0,u.B_)(t),!(0,l.f)()){e.next=8;break}return e.abrupt("return");case 8:if(r=!!(0,c.IC)(),!(t.analyticsEnabled&&!r)){e.next=12;break}throw Error("Failed to initialize AnalyticsWebClient. Analytics logging will not be set for native method overrides.");case 12:return e.next=14,f();case 14:if((0,u.re)().webStorageEnabled){e.next=17;break}return e.abrupt("return");case 17:return e.next=19,b(d.E.LocalStorage);case 19:return e.next=21,b(d.E.SessionStorage);case 21:a.V.debug("initiizeControls finished"),e.next=27;break;case 24:e.prev=24,e.t0=e.catch(3),a.V.errorWithOperationalEvent({action:"initializeControlsError",message:"Failed to initialize browser storage controls. ".concat(e.t0.message||"")});case 27:case"end":return e.stop()}},e,null,[[3,24]])}));return function(){return e.apply(this,arguments)}}()},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/set-cookie/index.js":(e,t,r)=>{"use strict";r.d(t,{T:()=>y});var s=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),n=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),i=r("./node_modules/@babel/runtime/regenerator/index.js"),o=r.n(i),a=r("./node_modules/js-cookie/src/js.cookie.js"),l=r.n(a),c=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),u=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),d=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),h=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/item-processing/index.js"),p=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),m=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js");function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function g(e){for(var t=1;t{"use strict";r.d(t,{BU:()=>u,SG:()=>c,pT:()=>d,ub:()=>l});var s=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),n=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/helpers.js"),i=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/constants.js"),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/banner-controls/get-banner-visibility/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/set-strictly-necessary-cookie/index.js"),l=function(e){var t=new Date;t.setTime(t.getTime()+6e5),(0,a.G)(i.bT,e,{expires:t,path:"/"}),s.V.debug("Set Consent Token ".concat(i.bT," ").concat(e))},c=function(e){var t=new Date;t.setFullYear(t.getFullYear()+1),(0,a.G)(i.CK,e,{expires:t,path:"/"}),s.V.debug("set fallback consent token: ".concat(i.CK," ").concat(e))},u=function(e,t){var r=(0,o.H)({consentToken:e,consentTimestamp:t}),l=(0,n.l)(!!r),c=new Date;c.setTime(c.getTime()+6e5),(0,a.G)(i.vk,l,{expires:c,path:"/"}),s.V.debug("set shouldShowBannerCookie: ".concat(i.vk," ").concat(l))},d=function(e,t){l(e),u(e,t)}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/set-strictly-necessary-cookie/index.js":(e,t,r)=>{"use strict";r.d(t,{G:()=>d});var s=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),n=r("./node_modules/js-cookie/src/js.cookie.js"),i=r.n(n),o=r("./node_modules/@atlaskit/platform-feature-flags/dist/esm/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function u(e){for(var t=1;t{"use strict";r.d(t,{Eu:()=>d,HD:()=>w,Z$:()=>C,Z3:()=>b,wd:()=>_});var s=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),n=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),i=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/helpers.js"),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/constants.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/consent-hub-service/utils.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function u(e){for(var t=1;t{"use strict";r.d(t,{l:()=>m});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/regenerator/index.js"),i=r.n(n),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/constants.js"),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-cookie/index.js"),u=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/set-required-consent-cookies/index.js"),d=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-consent-token/utils.js"),h=function(){var e=(0,s.A)(i().mark(function e(){var t,r,s,n,o,a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(0,c.R)(l.CK),e.next=3,(0,d.L)(t);case 3:var i;if(!(r=e.sent)){e.next=15;break}if(s=r.consentToken,n=r.consentTimestamp,i=s,o=(0,c.R)(l.PN)||i,!((a=(0,c.R)(l.PN))||""===a)){e.next=13;break}return(0,u.BU)(o),(0,u.ub)(o),e.abrupt("return",""===o?void 0:o);case 13:return(0,u.pT)(o,n),e.abrupt("return",s);case 15:return e.abrupt("return",void 0);case 16:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),p=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/transformer/index.js");function m(){return f.apply(this,arguments)}function f(){return(f=(0,s.A)(i().mark(function e(){var t,r,s;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,o.re)().localConsentMode){e.next=7;break}if(t=(0,c.R)(l.OF)){e.next=4;break}return e.abrupt("return",void 0);case 4:return e.abrupt("return",(0,p.wd)(t));case 7:if(r=(0,c.R)(l.bT)){e.next=14;break}return e.next=11,h();case 11:return s=e.sent,(0,a.f)()&&s&&(window.__COOKIE_CONSENT_PREFERENCES__=Object.assign(window.__COOKIE_CONSENT_PREFERENCES__||{},{consentToken:s})),e.abrupt("return",s?(0,p.wd)(s):void 0);case 14:return e.abrupt("return",(0,p.wd)(r));case 15:case"end":return e.stop()}},e)}))).apply(this,arguments)}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/third-party-controls/check-third-party/index.js":(e,t,r)=>{"use strict";r.d(t,{W:()=>p});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/regenerator/index.js"),i=r.n(n),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),l=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),u=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),d=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/preferences-controls/get-preferences/index.js"),h=function(){var e=(0,s.A)(i().mark(function e(t){var r,s,n,o,a,h,p,m,f,g,y;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.l)();case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return",Promise.resolve(!1));case 5:return s=!1,o=(0,c.re)().loadCache,e.next=9,o(u.kU.Cookies);case 9:return(n=e.sent)&&(h=(a=n).thirdPartyKeys,p=a.categories,m=h[t],f=(0,l.A)((0,l.A)((0,l.A)((0,l.A)((0,l.A)({},p.STRICTLY_NECESSARY,u.A7.StrictlyNecessary),p.FUNCTIONAL,u.A7.Functional),p.ANALYTICS,u.A7.Analytics),p.MARKETING,u.A7.Marketing),p.UNKNOWN,u.A7.Unknown),g=null!==m?f[m]:null,y=!1,g&&(y=r[g]),s=y),e.abrupt("return",Promise.resolve(s));case 12:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),p=function(){var e=(0,s.A)(i().mark(function e(t,r,s){var n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h(t);case 3:return n=e.sent,(0,o.vr)({action:"usedCheckThirdParty",attributes:{wasRejected:!n,thirdParty:t}}),e.abrupt("return",n?r():null==s?void 0:s());case 8:e.prev=8,e.t0=e.catch(0),a.V.errorWithOperationalEvent({action:"checkThirdPartyError",attributes:{wasRejected:!0,thirdParty:t},message:"Failed to use check third party. ".concat(e.t0.message||"")});case 11:case"end":return e.stop()}},e,null,[[0,8]])}));return function(t,r,s){return e.apply(this,arguments)}}()},"./node_modules/@atlassian/browser-storage-controls/dist/esm/services/consent-hub-service/index.js":(e,t,r)=>{"use strict";r.d(t,{bE:()=>u,fy:()=>d,im:()=>p});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/regenerator/index.js"),i=r.n(n),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/consent-hub-service/utils.js"),l="".concat("/gateway/api/consenthub/session","/user"),c="".concat(l,"/consents/cookies"),u=function(e){return e?{consentToken:(0,a.Ol)(e),consentTimestamp:(0,a.h)(e)}:{consentToken:(0,a.Ol)({}),consentHubInaccessible:!0}},d=function(){var e=(0,s.A)(i().mark(function e(){var t,r,s,n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.location.origin,r="".concat(t).concat(c),e.prev=2,e.next=5,fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}});case 5:if((s=e.sent).ok){e.next=8;break}throw Error("Failed to fetch preferences from ConsentHub with status: ".concat(s.status));case 8:return e.next=10,s.json();case 10:return n=e.sent,e.abrupt("return",u(n));case 14:return e.prev=14,e.t0=e.catch(2),o.V.errorWithOperationalEvent({action:"fetchConsentPreferencesError",message:e.t0.message||""}),e.abrupt("return",u());case 18:case"end":return e.stop()}},e,null,[[2,14]])}));return function(){return e.apply(this,arguments)}}(),h=function(e,t){var r=window.location,s=r.origin,n=r.pathname,i=(0,a.zm)(e,t);return JSON.stringify({action:"CONSENT_DATA_UNAVAILABLE"in e&&e.CONSENT_DATA_UNAVAILABLE?"FORM_FILL":"UPDATE_PREFERENCES",consents:i,formUrl:"".concat(s).concat(n),locale:"UNKNOWN",site:"atlassian",source:"COOKIE_PREFERENCES"})},p=function(){var e=(0,s.A)(i().mark(function e(t,r){var s,n,c;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s="".concat(window.location.origin).concat(l),e.prev=1,e.next=4,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:h(t,r)});case 4:if(!(!(n=e.sent).ok||202!==n.status&&200!==n.status)){e.next=9;break}throw c="Failed to save preferences to ConsentHub with status: ".concat(n.status),new a.CY(c,n.status);case 9:e.next=15;break;case 11:throw e.prev=11,e.t0=e.catch(1),o.V.errorWithOperationalEvent({action:"saveConsentPreferencesError",message:e.t0.message||""}),e.t0;case 15:case"end":return e.stop()}},e,null,[[1,11]])}));return function(t,r){return e.apply(this,arguments)}}()},"./node_modules/@atlassian/browser-storage-controls/dist/esm/services/consent-hub-service/utils.js":(e,t,r)=>{"use strict";r.d(t,{CY:()=>A,SA:()=>S,gy:()=>_,zm:()=>k,h:()=>E,yl:()=>b,Ol:()=>O});var s=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),n=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),i=r("./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),o=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),a=r("./node_modules/@babel/runtime/helpers/esm/inherits.js"),l=r("./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js"),c=r("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),u=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),d=r("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),h=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/helpers.js"),p=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/constants.js"),m=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-cookie/index.js"),f=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),g=function(e){return e.StrictlyNecessary="strictlyNecessaryCookies",e.Functional="functionalCookies",e.Analytics="performanceCookies",e.Marketing="targetingCookies",e.Unknown="unknownCookies",e}({});function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}var v=function(e){return e[0]+e[1]+e[2]===p.Bk},b=function(e){if(v(e)){var t="1"===e[8],r="1"===e[9],s="1"===e[10],n="1"===e[11];return t||r||s||n}return!1},_=function(e){var t=e[0]+e[1]+e[2]===p.oG,r=v(e);return!t&&(r?!b(e):(0,h.J)(e[7]))},w=function(e){var t=p.sD,r=Object.entries(p.dx).reduce(function(t,r){var s=(0,d.A)(r,2),n=s[0],i=s[1];return n===f.A7.StrictlyNecessary?t:n===f.RK.UserIsAuthenticated?t+(0,h.l)(!e):n===f.RK.ConsentDataUnavailable?t+(0,h.l)(!!e):t+(0,h.l)(i)},"");return"".concat(t).concat(r)},C=function(e){var t,r,s,n;return[p.sD,(0,h.l)(!!(null!==(t=e.find(function(e){return e.key===g.Functional}))&&void 0!==t&&t.granted)),(0,h.l)(!!(null!==(r=e.find(function(e){return e.key===g.Analytics}))&&void 0!==r&&r.granted)),(0,h.l)(!!(null!==(s=e.find(function(e){return e.key===g.Marketing}))&&void 0!==s&&s.granted)),(0,h.l)(!!(null!==(n=e.find(function(e){return e.key===g.Unknown}))&&void 0!==n&&n.granted)),0,1,0].join("")},O=function(e){var t=e.consents;return t?0===t.length?w():C(t):(0,m.R)(p.CK)||w(!0)},k=function(e,t){var r=[f.A7.StrictlyNecessary,f.A7.Functional,f.A7.Analytics,f.A7.Marketing,f.A7.Unknown],s=(0,u.A)((0,u.A)((0,u.A)((0,u.A)((0,u.A)({},f.A7.StrictlyNecessary,g.StrictlyNecessary),f.A7.Functional,g.Functional),f.A7.Analytics,g.Analytics),f.A7.Marketing,g.Marketing),f.A7.Unknown,g.Unknown);return r.map(function(r){return{key:s[r],granted:!!e[r],gatheredTs:new Date().toISOString(),displayedText:t[r]}})},E=function(e){var t=e.consents;if(t&&t.length){var r=t.map(function(e){return new Date(e.updatedTs).getTime()});return new Date(Math.max.apply(Math,(0,c.A)(r))).toISOString()}},S=function(e){var t=!1;if(e){var r=new Date;r.setFullYear(r.getFullYear()-1),t=new Date(e){"use strict";r.d(t,{W:()=>d});var s=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),n=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),i=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),o=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),a=r("./node_modules/@babel/runtime/regenerator/index.js"),l=r.n(a),c=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js"),u=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),d=new(function(){var e,t,r,a;return(0,i.A)(function e(t,r){var s=this;(0,n.A)(this,e),(0,o.A)(this,"db",null),(0,o.A)(this,"isBooted",!1),(0,o.A)(this,"isAvailable",!1),(0,o.A)(this,"onConnectionErrorHandler",function(e){return function(t){u.V.warn("Error opening database."),e(t)}}),(0,o.A)(this,"onConnectionSuccessHandler",function(e,t){return function(){s.db=e.result,t()}}),(0,o.A)(this,"onConnectionUpgradeNeededHandler",function(e){return function(){s.db=e.result,s.db.createObjectStore(s.storeName,{keyPath:"id"})}}),(0,o.A)(this,"onGetRecordErrorHandler",function(e){return function(){var t="Failed to perform a get transaction on IndexedDB: ".concat(s.dbName," + ").concat(s.storeName);u.V.warn(t),e(t)}}),(0,o.A)(this,"onGetRecordSuccessHandler",function(e,t){return function(){t(e.result)}}),(0,o.A)(this,"onSetRecordErrorHandler",function(e){return function(){var t="Failed to perform a set transaction on IndexedDB: ".concat(s.dbName," + ").concat(s.storeName);u.V.warn(t),e(t)}}),(0,o.A)(this,"onSetRecordSuccessHandler",function(e){return function(){e()}}),this.dbName=t,this.storeName=r,this.isAvailable=this.getIsDBAvailable(),this.isBooted=!1,this.bootUpPromiseCache=null},[{key:"boot",value:(e=(0,s.A)(l().mark(function e(){return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isAvailable){e.next=3;break}return u.V.warn("IndexedDB is not available"),e.abrupt("return");case 3:if(!this.isBooted){e.next=5;break}return e.abrupt("return");case 5:if(this.bootUpPromiseCache){e.next=18;break}return this.bootUpPromiseCache=this.openDB(),e.prev=7,e.next=10,this.bootUpPromiseCache;case 10:this.isBooted=!0,e.next=18;break;case 13:throw e.prev=13,e.t0=e.catch(7),this.isBooted=!1,u.V.warn("Error booting up IndexedDB."),e.t0;case 18:case"end":return e.stop()}},e,this,[[7,13]])})),function(){return e.apply(this,arguments)})},{key:"getIsDBAvailable",value:function(){return!(0,c.f)()&&!!window.indexedDB}},{key:"openDB",value:(t=(0,s.A)(l().mark(function e(){var t=this;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var s=indexedDB.open(t.dbName,2);s.onerror=t.onConnectionErrorHandler(r),s.onsuccess=t.onConnectionSuccessHandler(s,e),s.onupgradeneeded=t.onConnectionUpgradeNeededHandler(s)}));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"getRecord",value:(r=(0,s.A)(l().mark(function e(t){var r,s,n=this;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.isBooted){e.next=4;break}return e.next=4,this.boot();case 4:if(this.db){e.next=6;break}throw Error("Database is not opened");case 6:return r=this.db.transaction([this.storeName]).objectStore(this.storeName),s=new Promise(function(e,s){var i=r.get(t);i.onerror=n.onGetRecordErrorHandler(s),i.onsuccess=n.onGetRecordSuccessHandler(i,e)}),e.abrupt("return",s);case 12:throw e.prev=12,e.t0=e.catch(0),u.V.error("Error fetching record from database. ".concat(e.t0.message||"")),e.t0;case 16:case"end":return e.stop()}},e,this,[[0,12]])})),function(e){return r.apply(this,arguments)})},{key:"setRecord",value:(a=(0,s.A)(l().mark(function e(t){var r,s=this;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.isBooted){e.next=4;break}return e.next=4,this.boot();case 4:if(this.db){e.next=6;break}throw Error("Database is not opened");case 6:return r=new Promise(function(e,r){var n=s.db.transaction([s.storeName],"readwrite").objectStore(s.storeName),i={atlSetItem:"SET-BY-PACKAGE",id:t},o=n.put(i);o.onerror=s.onSetRecordErrorHandler(r),o.onsuccess=s.onSetRecordSuccessHandler(e)}),e.abrupt("return",r);case 10:throw e.prev=10,e.t0=e.catch(0),u.V.warn("Error setting record in database. ".concat(e.t0.message||"")),e.t0;case 14:case"end":return e.stop()}},e,this,[[0,10]])})),function(e){return a.apply(this,arguments)})}])}())("BSCIndexedDB","InternalStorageKeys")},"./node_modules/@atlassian/browser-storage-controls/dist/esm/services/web-storage-service/index.js":(e,t,r)=>{"use strict";r.d(t,{oR:()=>O,Rl:()=>k,wG:()=>E});var s,n,i=r("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),o=r("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),a=r("./node_modules/@babel/runtime/helpers/esm/createClass.js"),l=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),c=r("./node_modules/@babel/runtime/regenerator/index.js"),u=r.n(c),d=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/bsc-global-state/index.js"),h=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/is-ssr/index.js"),p=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/logger/index.js"),m=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js"),f=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/indexed-db-service/index.js"),g=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/web-storage-service/types.js"),y=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/analytics-client/index.js"),v=function(e,t,r){var s={itemKey:e,storageType:t};try{return(0,y.vr)({action:"usedAtlBrowserStorageGetItem",attributes:s}),r.getItem(e)}catch(e){return p.V.errorWithOperationalEvent({action:"usedAtlBrowserStorageGetItemError",attributes:s,message:"Failed to get ".concat(t," item. ").concat(e.message||"")}),null}},b=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/common/utils/item-processing/index.js"),_=function(){var e=(0,i.A)(u().mark(function e(t,r,s,n,i){var o,a;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.XA)({itemKey:t,storageType:s===g.E.LocalStorage?m.kU.LocalStorage:m.kU.SessionStorage,productName:n});case 2:if(a={wasRejected:!(o=e.sent),itemKey:t,storageType:s},e.prev=4,(0,y.vr)({action:"usedAtlBrowserStorageSetItem",attributes:a}),!o){e.next=13;break}return e.next=9,f.W.setRecord(t);case 9:return i.setItem(t,r),e.abrupt("return",m.nW.SUCCESS);case 13:return e.abrupt("return",m.nW.BLOCKED);case 14:e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(4),p.V.errorWithOperationalEvent({action:"usedAtlBrowserStorageSetItemError",attributes:a,message:"Failed to set ".concat(s," item. ").concat(e.t0.message||"")}),e.abrupt("return",m.nW.BLOCKED);case 20:case"end":return e.stop()}},e,null,[[4,16]])}));return function(t,r,s,n,i){return e.apply(this,arguments)}}(),w=function(e,t,r,s){var n={itemKey:e,storageType:r};try{return(0,y.vr)({action:"usedAtlBrowserStorageSetStrictlyNecessaryItem",attributes:n}),f.W.setRecord(e).then(function(){}).catch(function(e){throw Error(e.message||"")}),s.setItem(e,t),m.nW.SUCCESS}catch(e){return p.V.errorWithOperationalEvent({action:"usedAtlBrowserStorageSetStrictlyNecessaryItemError",attributes:n,message:"Failed to set strictly necessary ".concat(r," item. ").concat(e.message||"")}),m.nW.FAILED}},C=function(){var e;return(0,a.A)(function e(t,r){var s;(0,o.A)(this,e),(0,l.A)(this,"isAvailable",!1),(0,l.A)(this,"checkIfSetByPackage",(s=(0,i.A)(u().mark(function e(t){var r,s,n,i,o;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.itemKey,n=void 0===(s=t.isSetCallback)?function(){}:s,o=void 0===(i=t.isNotSetCallback)?function(){}:i,e.prev=1,e.next=4,f.W.getRecord(r);case 4:if(!e.sent){e.next=10;break}return n(),e.abrupt("return",!0);case 10:return o(),e.abrupt("return",!1);case 12:e.next=19;break;case 14:return e.prev=14,e.t0=e.catch(1),p.V.errorWithOperationalEvent({action:"usedCheckIfSetByPackageError",message:"IDB lookup failed to check if item was set by package. ".concat(e.t0.message||""),attributes:{itemKey:r}}),o(),e.abrupt("return",!1);case 19:case"end":return e.stop()}},e,null,[[1,14]])})),function(e){return s.apply(this,arguments)})),this.storage=t,this.storageType=r,this.isAvailable=this.isStorageAvailable()},[{key:"isWebStorageEnabled",get:function(){return!!(0,d.re)().webStorageEnabled||(p.V.debug("WebStorage config is disabled, cannot proceed."),!1)}},{key:"getItem",value:function(e){return this.isWebStorageEnabled?this.isAvailable?v(e,this.storageType,this.storage):(p.V.warn("".concat(this.storageType," is unavailable. Failed to get item ").concat(e)),null):this.storage.getItem(e)}},{key:"setItem",value:(e=(0,i.A)(u().mark(function e(t,r){var s,n;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isWebStorageEnabled){e.next=3;break}return this.storage.setItem(t,r),e.abrupt("return");case 3:if(this.isAvailable){e.next=6;break}return p.V.warn("".concat(this.storageType," is unavailable. Failed to set item ").concat(t)),e.abrupt("return");case 6:return s=(0,d.re)().product,e.next=9,_(t,r,this.storageType,s,this.storage);case 9:n=e.sent,p.V.debug("".concat(n===m.nW.SUCCESS?"Successfully":"Failed to"," set item ").concat(t," with value ").concat(r));case 11:case"end":return e.stop()}},e,this)})),function(t,r){return e.apply(this,arguments)})},{key:"setStrictlyNecessaryItem",value:function(e,t){if(!this.isWebStorageEnabled){this.storage.setItem(e,t);return}if(!this.isAvailable){p.V.warn("".concat(this.storageType," is unavailable. Failed to set strictly necessary item ").concat(e));return}var r=w(e,t,this.storageType,this.storage);p.V.debug("".concat(r===m.nW.SUCCESS?"Successfully":"Failed to"," set strictly necessary item ").concat(e," with value ").concat(t))}},{key:"removeItem",value:function(e){if(!this.isAvailable){p.V.warn("".concat(this.storageType," is unavailable. Failed to remove item ").concat(e));return}this.storage.removeItem(e)}},{key:"key",value:function(e){return this.isAvailable?this.storage.key(e):null}},{key:"length",value:function(){return this.isAvailable?this.storage.length:0}},{key:"clear",value:function(){this.isAvailable&&this.storage.clear()}},{key:"isStorageAvailable",value:function(){if((0,h.f)())return!1;try{var e="__storage_test__";return this.storage.setItem(e,e),this.storage.removeItem(e),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&this.storage&&0!==this.storage.length}}}])}(),O=new C(null===(s=window)||void 0===s?void 0:s.localStorage,g.E.LocalStorage),k=new C(null===(n=window)||void 0===n?void 0:n.sessionStorage,g.E.SessionStorage),E=function(e){return(0,l.A)((0,l.A)({},g.E.LocalStorage,O),g.E.SessionStorage,k)[e]}},"./node_modules/@atlassian/browser-storage-controls/dist/esm/services/web-storage-service/types.js":(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var s=function(e){return e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e}({})},"./node_modules/@atlassian/browser-storage-controls/dist/esm/types.js":(e,t,r)=>{"use strict";r.d(t,{A7:()=>s,RK:()=>i,hZ:()=>o,kU:()=>a,nW:()=>l,uG:()=>n});var s=function(e){return e.StrictlyNecessary="STRICTLY_NECESSARY",e.Functional="FUNCTIONAL",e.Marketing="MARKETING",e.Analytics="ANALYTICS",e.Unknown="UNKNOWN",e}({}),n=function(e){return e.ConsentDataUnavailable="CONSENT_DATA_UNAVAILABLE",e.ConsentedUnderGDPR="CONSENTS_SAVED_IN_GDPR_LOCALE",e.ConsentedUnderCPRA="CONSENTS_SAVED_IN_CPRA_LOCALE",e.ConsentedUnderLGPD="CONSENTS_SAVED_IN_LGPD_LOCALE",e.ConsentedUnderFADP="CONSENTS_SAVED_IN_FADP_LOCALE",e}({}),i=function(e){return e.ConsentsAreDefault="DEFAULT_CONSENTS",e.UserIsAuthenticated="USER_AUTHENTICATED",e.ConsentDataUnavailable="CONSENT_DATA_UNAVAILABLE",e}({}),o=function(e){return e[e.INTERNAL=0]="INTERNAL",e}({}),a=function(e){return e.Cookies="Cookies",e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e}({}),l=function(e){return e.SUCCESS="SUCCESS",e.BLOCKED="BLOCKED",e.FAILED="FAILED",e}({})},"./node_modules/@atlassiansox/analytics-web-client/dist/esm/analyticsWebClient.js":(e,t,r)=>{"use strict";r.d(t,{Ay:()=>r$});var s=r("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),n=r("./node_modules/@atlassiansox/analytics-web-client/node_modules/uuid/v4.js"),i=r.n(n),o=r("./node_modules/@atlassiansox/analytics-web-client/dist/esm/analyticsWebTypes.js");class a{constructor(){(0,s.A)(this,"_bindEventListeners",()=>{document.addEventListener(this._visibilityChange,this._handleVisibilityChange,!1)}),(0,s.A)(this,"_handleVisibilityChange",()=>{let e=document[this._hidden];this._isHidden=e,this._callbacks.forEach(t=>t(e))}),this._isHidden=!1,this._callbacks=new Map,this._hidden=void 0,this._visibilityChange=void 0,"undefined"!=typeof document&&(void 0!==document.hidden?(this._isHidden=document.hidden,this._hidden="hidden",this._visibilityChange="visibilitychange"):void 0!==document.msHidden?(this._isHidden=document.msHidden,this._hidden="msHidden",this._visibilityChange="msvisibilitychange"):void 0!==document.webkitHidden&&(this._isHidden=document.webkitHidden,this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"),void 0!==document.addEventListener&&void 0!==this._hidden&&this._bindEventListeners())}addCallback(e,t){if("string"!=typeof e)throw Error("Invalid name, must be string");if("function"!=typeof t)throw Error("Invalid callback, must be function");this._callbacks.set(e,t)}removeCallback(e){this._callbacks.has(e)&&this._callbacks.delete(e)}getIsHidden(){return this._isHidden}}class l{constructor(){this._performance=window.performance}clearMarks(...e){this._performance&&this._performance.clearMarks&&this._performance.clearMarks(...e)}mark(...e){this._performance&&this._performance.mark&&this._performance.mark(...e)}getEntriesByName(...e){return this._performance&&this._performance.getEntriesByName?this._performance.getEntriesByName(...e):[]}getTimeOrigin(){return this._performance&&(this._performance.timeOrigin||this._performance.timing)?this._performance.timeOrigin||this._performance.timing.navigationStart:0}now(){return this._performance&&this._performance.now?this._performance.now():Date.now?Date.now():+new Date}isAvailable(){return!!this._performance&&!!this._performance.clearMarks&&!!this._performance.mark&&!!this._performance.getEntriesByName&&!!this._performance.timing}}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function u(e){for(var t=1;tt?`${e}.${t}`:e),(0,s.A)(this,"_getEventTimingByName",e=>{let t=this._performance.getEntriesByName(e);return t[t.length-1]}),(0,s.A)(this,"_getApdexFields",e=>{let t=this._getApdexTimings(e),r=this._calculateApdex({duration:t.duration,threshold:e.threshold});return u(u({},t),{},{apdex:r})}),(0,s.A)(this,"_getApdexTimings",e=>{let t=this._getEventKey(e),r=`${t}-start`,s=e.startTime||this._getStartTime(e,r),n=e.stopTime||this._getStopTime();return this._cleanApdexState(t),{startTime:s,stopTime:n,duration:n-s}}),(0,s.A)(this,"_getStartTime",(e,t)=>{let r=this._performance.getTimeOrigin();return e.type===o.LR.INITIAL_LOAD?r:r+this._getEventTimingByName(t).startTime}),(0,s.A)(this,"_getStopTime",()=>this._performance.getTimeOrigin()+this._performance.now()),(0,s.A)(this,"_cleanApdexState",e=>{this._performance.clearMarks(`${e}-start`),this._performance.clearMarks(`${e}-stop`),this._startedEvents.delete(e)}),(0,s.A)(this,"_getVisibilityFields",e=>{let t;if(e.type===o.LR.INITIAL_LOAD)t=!this._wasPreviouslyHidden;else if(e.type===o.LR.TRANSITION){let r=this._getEventKey(e);t=this._isActiveEvents.get(r)}return(e.startTime||e.stopTime)&&(t=!this._pageVisibility.getIsHidden()),{isActiveTab:t}}),(0,s.A)(this,"_calculateApdex",({duration:e,threshold:t=this._threshold})=>e<=t?1:e<=4*t?.5:0),(0,s.A)(this,"_validateStartEvent",e=>{if(!e)throw Error('Missing "event" in Apdex start event');if(!e.task)throw Error('Missing "task" in Apdex start event');if("string"!=typeof e.task)throw Error('Invalid "task" in Apdex start event');if(e.taskId&&"string"!=typeof e.taskId)throw Error('Invalid "taskId" in Apdex start event')}),(0,s.A)(this,"_validateStopEvent",e=>{if(!e)throw Error('Missing "event" in Apdex stop event');if(!e.task)throw Error('Missing "task" in Apdex stop event');if("string"!=typeof e.task)throw Error('Invalid "task" in Apdex stop event');if(e.taskId&&"string"!=typeof e.taskId)throw Error('Invalid "taskId" in Apdex stop event');if(!e.type)throw Error('Missing "type" in Apdex stop event');if(e.type&&!(0,o.Xj)(o.LR,e.type))throw Error('Invalid "type" in Apdex stop event');if(e.threshold&&"number"!=typeof e.threshold)throw Error('Invalid "threshold" in Apdex stop event');if(!e.startTime&&e.type===o.LR.TRANSITION){let t=this._getEventKey(e);if(!this._startedEvents.has(t))throw Error(`Apdex event transition "${t}" was not started`)}if(e.startTime&&!("number"==typeof e.startTime&&e.startTime>=0))throw Error('Invalid "startTime" in Apdex stop event');if(e.stopTime&&"number"!=typeof e.stopTime)throw Error('Invalid "stopTime" in Apdex stop event');if(e.stopTime<=e.startTime)throw Error('"stopTime" should be greater than "startTime" in Apdex stop event')}),(0,s.A)(this,"_shouldSendEvent",e=>!!e&&"number"==typeof e.apdex),(0,s.A)(this,"_sendEvent",(e,t)=>{this._shouldSendEvent(e)&&this._onEvent({source:"ui",action:"readyForUser",actionSubject:"ui",attributes:u(u({},e.additionalAttributes),{},{task:e.task,taskId:e.taskId,type:e.type,threshold:e.threshold||this._threshold,apdex:e.apdex,startTime:e.startTime,stopTime:e.stopTime,duration:e.duration,isActiveTab:e.isActiveTab})},t)}),!e)throw Error("Missing onEvent callback");if("function"!=typeof e)throw Error("Invalid onEvent, must be function");if(!(t instanceof a))throw Error("Invalid pageVisibility, must be PageVisibility class");this._startedEvents=new Map,this._performance=new l,this._onEvent=e,this._threshold=1e3,this._wasPreviouslyHidden=t.getIsHidden(),this._isActiveEvents=new Map,this._pageVisibility=t,this._pageVisibility.addCallback("apdexEvent",e=>{this.onVisibilityChange(!e)})}start(e){if(this._validateStartEvent(e),!this._performance.isAvailable())return;let t=this._getEventKey(e),r=`${t}-start`;this._startedEvents.set(t,!0),this._isActiveEvents.set(t,!this._pageVisibility.getIsHidden()),this._performance.clearMarks(r),this._performance.mark(r)}getStart(e){if(this._validateStartEvent(e),!this._performance.isAvailable())return;let t=this._getEventKey(e),r=`${t}-start`;return this._getEventTimingByName(r)}stop(e,t){if(this._validateStopEvent(e),!this._performance.isAvailable())return;let r=this._getApdexFields(e),s=this._getVisibilityFields(e);this._sendEvent(u(u(u({},e),r),s),t)}onVisibilityChange(e){e||(this._wasPreviouslyHidden=!0,Array.from(this._isActiveEvents.keys()).forEach(e=>this._isActiveEvents.set(e,!1)))}}let h=e=>"function"==typeof e,p=(e,t)=>()=>{if(h(e))try{return e()}catch(e){console.error(`${t} - ${e instanceof Error?e.message:String(e)}`);return}return e},m=e=>e.embeddedType===o.vH.FIRST_PARTY&&void 0!==e.embeddedFromProduct,f=e=>e.embeddedType===o.vH.THIRD_PARTY&&void 0!==e.embeddedFromTopLevelDomain;function g(e){return!0==(null!==e&&"object"==typeof e&&!1===Array.isArray(e))&&"[object Object]"===Object.prototype.toString.call(e)}function y(e){if(!1===g(e))return!1;let t=e.constructor;if("function"!=typeof t)return!1;let r=t.prototype;return!1!==g(r)&&"isPrototypeOf"in r}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function b(e){for(var t=1;t0}function x(e,t){return j(t)?{[e]:t}:void 0}function T(e){if(j(e))return x("containers",function(e){let t={};return Object.keys(e).forEach(r=>{let s=e[r];t[r]={id:s.id,type:s.type}}),t}(e))}function P(e,t){return b({containerType:e.containerType,containerId:e.containerId,source:e.source,objectType:e.objectType,objectId:e.objectId,actionSubject:e.actionSubject,action:e.action,actionSubjectId:e.actionSubjectId,attributes:e.attributes,nonPrivacySafeAttributes:e.nonPrivacySafeAttributes,tags:e.tags,highPriority:e.highPriority,eventType:t},T(e.containers))}function D(e){return`${e.actionSubject} ${e.action}`}let R=function(e){return e.QUIET="quiet",e.STANDARD="standard",e.COMPLETE="complete",e}({});function L(e,t,r,s,n,i,o,a,l,c,u,d,h){let p=I(e,function(e){let{env:t,product:r,subproduct:s,version:n,origin:i,platform:o}=e;return{env:t,product:r,subproduct:s,version:n,origin:i,platform:o}}(s)),m=_(t),f=C(l),g=O(u),y=w(r),v=P(s,n);return b(b(b(b(b(b(b(b(b({},p),m),f),y),v),S(s)),{},{tabId:i,sessionId:o,taskSessions:a,pageLoadId:c},g),k(d)),E(h))}let N=1e4,U=(e,t)=>Object.keys(e).reduce((r,s)=>(r[t(e[s],s,e)]=e[s],r),{}),M=(e,t)=>t.reduce((t,r)=>(r in e&&(t[r]=e[r]),t),{}),F=(e,t)=>Object.keys(e).filter(r=>!t(e[r],r)).reduce((t,r)=>(t[r]=e[r],t),{}),B=(e,t)=>Object.keys(e).filter(r=>t(e[r],r)).reduce((t,r)=>(t[r]=e[r],t),{}),V=(e,t)=>Object.keys(e).filter(e=>0>t.indexOf(e)).reduce((t,r)=>(t[r]=e[r],t),{}),K=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||"object"!=typeof e&&"object"!=typeof t)return e===t;if(e.prototype!==t.prototype)return!1;let r=Object.keys(e);return r.length===Object.keys(t).length&&r.every(r=>K(e[r],t[r]))},G=(e,t)=>e.reduce((e,r,s,n)=>(e[t(r,s,n)?0:1].push(r),e),[[],[]]),$=Object.freeze([o.$q.OPERATIONAL,o.$q.TRACK,o.$q.UI]);function z(e){if(e){if(e&&e.constructor!==Object)throw Error("properties.containers must be an Object");Object.values(e).forEach(e=>(function(e){if(!y(e))throw Error("properties.containers must be an Object");if(!("id"in e))throw Error("properties.containers is missing field 'id'");if("string"!=typeof e.id)throw Error("properties.containers.id must be of type String");if("type"in e&&"string"!=typeof e.type)throw Error("properties.containers.type must be of type String")})(e))}}function W(e){switch(e){case o.$q.OPERATIONAL:case o.$q.TRACK:case o.$q.UI:return!0;default:return!1}}function q(e){if(!e)throw Error("Missing event");if(!e.source)throw Error("Missing event.source");if(!e.actionSubject)throw Error("Missing event.actionSubject");if(!e.action)throw Error("Missing event.action");z(e.containers)}class H{constructor(e,t){if((0,s.A)(this,"canCompress",e=>{try{return e&&W(e.eventType)&&this.predicate(e)}catch(e){return!1}}),(0,s.A)(this,"compress",e=>{let[t,r]=G(e,e=>this.canCompress(e)),s=this.compressFn(t);if(!s)throw Error("No events were returned from the compression function");return s.forEach(e=>{(function(e){if(!W(e))throw Error(`Invalid action event type: ${e}, must be one of: [${$}]`)})(e.eventType),q(e)}),s.concat(r)}),"function"!=typeof e)throw Error("Invalid predicate, must be a function that accepts an event and returns a boolean");if("function"!=typeof t)throw Error("Invalid compressFn, must be a function that both accepts and returns an array of events");this.predicate=e,this.compressFn=t}}function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function Q(e){for(var t=1;tthis.compressionRules.some(t=>t.canCompress(e))),(0,s.A)(this,"compress",e=>this.createGroups(e).reduce((e,t)=>{let r=this.compressGroup(t);return e.concat(r)},[])),(0,s.A)(this,"createGroups",e=>e.reduce((e,t)=>{let r;let s=this.compressionRules.find(e=>e.canCompress(t));if(s){let e=P(t,t.eventType);r=V(t,Object.keys(e))}let n=e.find(e=>s===e.compressor&&K(r,e.contextFields));return n?n.events.push(t):e.push({contextFields:r,compressor:s,events:[t]}),e},[])),(0,s.A)(this,"compressGroup",e=>{if(!e.compressor)return e.events;try{return e.compressor.compress(e.events).map(t=>Q(Q({},t),e.contextFields))}catch(t){return e.events}}),!Array.isArray(e))throw Error("Event compressors must be constructed with an array of CompressionRules");if(!e.every(e=>e instanceof H))throw Error("Event compressors can only be constructed with instances of CompressionRule");this.compressionRules=e}}class X{constructor(e,t){(0,s.A)(this,"push",(e,t,r,s)=>{this.eventArgs.push({identifier:e,builtEvent:t,context:r,userInfo:s})}),(0,s.A)(this,"size",()=>this.eventArgs.length),(0,s.A)(this,"startFlush",()=>{try{this.eventArgs=this.compressEventArgs(this.eventArgs)}catch(e){console.warn(`Failed to perform compression on the delayed analytics events. Error: ${e.message}. Sending ${this.eventArgs.length} uncompressed events instead`)}this.flushNextBatch()}),(0,s.A)(this,"cancelFlush",()=>{this.flushBatchTimeout&&(clearTimeout(this.flushBatchTimeout),this.flushBatchTimeout=null)}),(0,s.A)(this,"flushNextBatch",()=>{this.eventArgs.splice(0,7).forEach(e=>this.processFn(e.identifier,e.builtEvent,e.context,e.userInfo)),this.eventArgs.length>0?this.flushBatchTimeout=setTimeout(()=>this.flushNextBatch(),100):this.flushBatchTimeout=null}),(0,s.A)(this,"compressEventArgs",e=>{let[t,r]=G(e,e=>this.compressor.canCompress(e.builtEvent)),s=t.reduce((e,t)=>{let r=e.find(e=>K(e.userInfo,t.userInfo)&&K(e.context,t.context));return r?r.eventArgs.push(t):e.push({userInfo:t.userInfo,context:t.context,eventArgs:[t]}),e},[]).reduce((e,t)=>{try{let r=t.eventArgs.map(e=>e.builtEvent),s=this.compressor.compress(r).map(e=>({identifier:D(e),builtEvent:e,userInfo:t.userInfo,context:t.context}));return e.concat(s)}catch(e){return console.warn(`Failed to compress some analytics events. Error: ${e.message}. Sending ${t.eventArgs.length} uncompressed events instead`),t.eventArgs}},[]);return r.forEach(e=>s.push(e)),s}),this.processFn=e,this.flushBatchTimeout=null,this.eventArgs=[],this.compressor=new Y(t)}}let Z=function(e){return e.TIMEOUT="timeout",e.MANUAL="manual",e}({});class ee{constructor(e,t){(0,s.A)(this,"push",(e,t,r,s)=>{this.delayQueue.push(e,t,r,s)}),(0,s.A)(this,"startLowPriorityEventDelay",(e=N,t)=>{if(Number.isNaN(e)||e<=0)throw Error(`Invalid timeout period: ${e}, must be a number greater than 0`);this.delayTimeout&&clearTimeout(this.delayTimeout);let r=e?Math.min(e,3e4):3e4;this.delayCallback=t,this.delayTimeout=setTimeout(()=>this.stopLowPriorityEventDelay(Z.TIMEOUT),r),this.delayQueue.cancelFlush(),this.isDelaying=!0}),(0,s.A)(this,"stopLowPriorityEventDelay",(e=Z.MANUAL)=>{var t;this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=void 0),this.delayQueue.startFlush(),this.isDelaying=!1,null===(t=this.delayCallback)||void 0===t||t.call(this,e),this.delayCallback=void 0}),(0,s.A)(this,"isDelayingLowPriorityEvents",()=>this.isDelaying),this.isDelaying=!1,this.delayQueue=new X(e,t)}}let et=function(e){return e.IN_PROGRESS="inProgress",e.QUEUE="queue",e.RECLAIM_START="reclaimStart",e.RECLAIM_END="reclaimEnd",e.ACK="ack",e}({}),er=function(e){return e[e.RECLAIM_TIMEOUT=1e4]="RECLAIM_TIMEOUT",e[e.RECLAIM_WAIT=500]="RECLAIM_WAIT",e[e.RECLAIM_WAIT_THRESHOLD=2e3]="RECLAIM_WAIT_THRESHOLD",e}({}),es=(e,t)=>({[et.ACK]:`${e}.${t}.${et.ACK}`,[et.QUEUE]:`${e}.${t}.${et.QUEUE}`,[et.IN_PROGRESS]:`${e}.${t}.${et.IN_PROGRESS}`,[et.RECLAIM_START]:`${e}.${t}.${et.RECLAIM_START}`,[et.RECLAIM_END]:`${e}.${t}.${et.RECLAIM_END}`}),en=Object.values(et),ei=e=>{if("string"!=typeof e||0===e.length)return 0;try{let t=Object.keys(localStorage).filter(t=>t&&t.startsWith(`${e}.`)||!1).map(e=>e.split(".")).filter(e=>3===e.length&&en.includes(e[2])).reduce((e,t)=>{let[,r,s]=t;return void 0===e[r]&&(e[r]={}),e[r][s]=!0,e},{}),r=Object.keys(t).filter(e=>!0!==t[e][et.ACK]);return r.forEach(t=>{let{queue:r,inProgress:s,reclaimStart:n,reclaimEnd:i}=es(e,t);localStorage.removeItem(s),localStorage.removeItem(r),localStorage.removeItem(n),localStorage.removeItem(i)}),r.length}catch(e){}return 0};function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function ea(e){for(var t=1;tnew Promise(t=>{setTimeout(t,e)}),ec=e=>{try{return Object.keys(localStorage).filter(t=>t.startsWith(e)).map(e=>e.split(".")).filter(t=>{if(3===t.length&&t[0]===e&&t[2]===et.ACK)try{let e=localStorage.getItem(t.join("."));if(e){let t=parseInt(e);return er.RECLAIM_TIMEOUT+te[1])}catch(e){}return[]},eu=async(e,t)=>{let{ack:r,reclaimStart:s,reclaimEnd:n}=e.storageKeys,i=Date.now();if(localStorage.setItem(s,e.reclaimProcessId),localStorage.setItem(r,i.toString()),await el(er.RECLAIM_WAIT),Date.now()>i+er.RECLAIM_WAIT_THRESHOLD||localStorage.getItem(s)!==e.reclaimProcessId)throw Error("Took to long to callback, reclaim abandonded. After reclaimStart.");if(localStorage.setItem(n,e.reclaimProcessId),await el(er.RECLAIM_WAIT),Date.now()>i+er.RECLAIM_WAIT_THRESHOLD||localStorage.getItem(s)!==e.reclaimProcessId||localStorage.getItem(n)!==e.reclaimProcessId)throw Error("Took to long to callback, reclaim abandonded. After reclaimEnd.");return ed(e,t)},ed=async(e,t)=>{let{queue:r,inProgress:s}=e.storageKeys,n=[...JSON.parse(localStorage.getItem(r)||"[]"),...Object.entries(JSON.parse(localStorage.getItem(s)||"{}")).map(([e,t])=>ea(ea({},t),{},{attemptNumber:t.attemptNumber+1,id:e}))];if(n.length>0){let i=await t(n);if("successful"===i.status)eh(e.storageKeys);else if("partial"===i.status){let e=n.filter(e=>!i.acceptedItemIds.includes(e.id));return localStorage.removeItem(s),localStorage.setItem(r,JSON.stringify(e)),{fullReclaim:!1}}}else eh(e.storageKeys);return{fullReclaim:!0}},eh=e=>{localStorage.removeItem(e.queue),localStorage.removeItem(e.inProgress),localStorage.removeItem(e.reclaimEnd),localStorage.removeItem(e.reclaimStart),localStorage.removeItem(e.ack)},ep=async(e,t)=>{if("string"!=typeof e||0===e.length)return{fullReclaims:0,partialReclaims:0,failedReclaims:0};let r=i()(),s=ec(e).map(s=>eu({queuePrefix:e,reclaimProcessId:r,storageKeys:es(e,s)},t)),n=await Promise.allSettled(s),o=n.filter(e=>"rejected"===e.status),a=n.filter(e=>"fulfilled"===e.status).map(e=>e.value),l=a.filter(e=>e.fullReclaim),c=a.filter(e=>!e.fullReclaim);return{failedReclaims:o.length,partialReclaims:c.length,fullReclaims:l.length}},em="namespace-timeAdded",ef="analytics-resilience",eg="timeToBeProcessedAfter",ey="timeAdded",ev="retryAttempts",eb=function(e){return e.INDEXEDDB="indexeddb",e.MEMORY="memory",e}({}),e_=function(e){return e.IGNORE="ignore",e.ABANDON="abandon",e.EVICT="evict",e}({});class ew extends Error{constructor(){super("window.indexeddb is undefined."),Object.setPrototypeOf(this,ew.prototype),this.name="NoIndexedDbError"}}let eC="AbandonWriteError";class eO extends Error{constructor(e){super(`Event Limit reached. Abandoning write to: ${e}`),Object.setPrototypeOf(this,eO.prototype),this.name=eC}}let ek="CallbackProcessingError";class eE extends Error{constructor(e){super(`Error thrown while processing events in callback: ${e&&"object"==typeof e&&"toString"in e&&"function"==typeof e.toString&&e.toString()||"string"==typeof e&&e||"Argument passed to CallbackProcessingError was not an Error or string."}`),Object.setPrototypeOf(this,eE.prototype),this.name=ek}}let eS="InvalidPolicyError";class eA extends Error{constructor(e,t){super(`Method '${t}' cannot be called with policy '${e}'.`),this.name=eS}}let eI=e=>!!e&&"object"==typeof e&&"name"in e&&"string"==typeof e.name&&(e.name===eC||e.name===ek||e.name===eS);var ej=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");let ex=7,eT=(e,t,{id:r,retryAttempts:s,timeToProcessOffset:n})=>({item:e,id:r||i()(),retryAttempts:s||0,timeToBeProcessedAfter:Date.now()+(n||0),namespace:t,timeAdded:Date.now()}),eP=e=>({logger:e.logger||console,useMemory:e.useMemory||!1,maxAttempts:e.maxAttempts||10,maxEventLimit:e.maxEventLimit||5e3}),eD=e=>new Promise((t,r)=>{e.onsuccess=e=>{t(e)},e.onerror=e=>{r(e)}}),eR=e=>new Promise((t,r)=>{e.oncomplete=()=>{t()},e.onerror=e=>{r(e)},e.onabort=e=>{r(e)}}),eL=(e,t)=>{try{"function"==typeof e.commit&&e.commit()}catch(e){throw t.error("Failed to force commit transaction:",e),e}return eR(e)},eN=(e,t)=>{e.onerror=e=>{t.warn("Error thrown from request:",e)}};class eU{constructor(e,t,r,n){if((0,s.A)(this,"deleteOldestNEvents",async(e,t)=>{var r;let s=e.index(em),n=IDBKeyRange.bound([this.namespace,0],[this.namespace,Date.now()]),i=s.getAllKeys(n,t),o=await eD(i),a=null==o||null===(r=o.target)||void 0===r?void 0:r.result;if(a&&Array.isArray(a)&&a.length>0)try{let t=a.map(t=>this.deleteItemHandler(e,t));await Promise.all(t)}catch(e){throw this.logger.warn("Failed to delete items from indexeddb.",e),e}}),e>0)this.eventLimit=e;else throw Error("Event Limit has to be set higher than 1");this.namespace=t,this.logger=r,this.deleteItemHandler=n}async insertItems(e,t,r=e_.ABANDON){let s=[...t],n=0;switch(r){case e_.ABANDON:await this.throwIfNotEnoughSpace(e,t.length);break;case e_.EVICT:n=await this.evictIfNotEnoughSpace(e,t.length);break;case e_.IGNORE:await this.calculateHowManyEventsWeCanAdd(e,s)}let i=s.map(t=>eD(e.add(t)));return await Promise.all(i),await eL(e.transaction,this.logger),{items:s,numberOfEvictedItems:n}}async throwIfNotEnoughSpace(e,t){let r=await this.calculateFreeSpace(e);if(rnew Promise(async(e,t)=>{if("undefined"!=typeof window){let r=window.setTimeout(()=>{this.logger.warn("IndexedDB timed out."),t(new ew)},15e3),s=window.indexedDB.open("analytics-web-client",1);s.onupgradeneeded=e=>{if(0!==e.oldVersion)throw Error("We cannot upgrade the database. Do not do this.");let t=s.result.createObjectStore(ef,{keyPath:"id"});t.createIndex(eg,eg,{unique:!1}),t.createIndex(ev,ev,{unique:!1}),t.createIndex(ey,ey,{unique:!1}),t.createIndex(em,["namespace","timeAdded"],{unique:!1})},s.onerror=function(){t(new ew)};try{return await eD(s),e(s.result)}catch(e){this.logger.warn("IndexedDB failed to initialise.",e),t(new ew)}finally{window.clearTimeout(r)}}else this.logger.warn("IndexedDB failed to initialise. No 'window' object."),t(new ew)})),(0,s.A)(this,"addItem",async(e,t={},r=e_.ABANDON)=>{let{logger:s,namespace:n}=this,i=eT(e,n,t),{objectStore:o}=await this.getObjectStoreAndTransaction("readwrite");if(r===e_.IGNORE)throw new eA(r,"IndexedDbConnector#addItem");try{if(!i.namespace||0===i.namespace.length||"string"!=typeof i.namespace)throw Error("Namespace not specified");let e=await this.globalEventLimitGuard.insertItems(o,[i],r);if(1===e.items.length)return{item:e.items[0],numberOfEvictedItems:e.numberOfEvictedItems};throw Error(`Incorrect number of items added. Expected: 1, got: ${e.items.length}`)}catch(e){if(eI(e))throw e;throw s.log("Failed to add item to table",e),Error("Request to add item to table failed")}}),(0,s.A)(this,"bulkAddItem",async(e,t=e_.ABANDON)=>{let{logger:r,namespace:s}=this,n=e.map(e=>{let{item:t}=e;return eT(t,s,(0,ej.A)(e,eM))}),{objectStore:i}=await this.getObjectStoreAndTransaction("readwrite");try{return await this.globalEventLimitGuard.insertItems(i,n,t)}catch(e){if(eI(e))throw e;throw r.log("Failed to add item to table",e),Error("Request to add item to table failed")}}),(0,s.A)(this,"getItems",async(e=ex)=>{let t=e>0?e:ex,{logger:r}=this,n=this.options.maxAttempts,{transaction:i,objectStore:o}=await this.getObjectStoreAndTransaction("readwrite"),a=o.index(eg),l=IDBKeyRange.upperBound(Date.now()),c=a.openCursor(l),u=await new Promise(async(e,i)=>{let o=[],a=0;c.onerror=e=>{r.error("Failed to open cursor:",e),i("Failed to open cursor")},c.onsuccess=i=>{let l=i.target.result;if(l){let i=function(e){for(var t=1;t=n?(++a,eN(l.delete(),r)):eN(l.update(c),r),o.length{let{transaction:t,objectStore:r}=await this.getObjectStoreAndTransaction("readwrite");try{let s=e.map(e=>this.deleteItem(r,e));await eL(t,this.logger),await Promise.all(s)}catch(e){throw this.logger.warn("Failed to delete items from indexeddb.",e),e}}),(0,s.A)(this,"getItemCount",async()=>{let{transaction:e,objectStore:t}=await this.getObjectStoreAndTransaction("readonly"),r=t.index(eg),s=IDBKeyRange.upperBound(Date.now()),n=r.count(s),i=await eD(n);return await eL(e,this.logger),i.target.result}),(0,s.A)(this,"processItems",async(e,t=ex)=>{let r=await this.getItems(t),{items:s}=r,n=(0,ej.A)(r,eF);try{let t=await e(s,n),r=s.map(e=>e.id);return await this.deleteItems(r),t}catch(e){throw new eE(e)}}),(0,s.A)(this,"deleteItem",async(e,t)=>{let{logger:r}=this;try{await eD(e.delete(t))}catch(e){throw r.error("Failed to delete item:",t,e),e}}),(0,s.A)(this,"getObjectStoreAndTransaction",async e=>{let t=(await this.db).transaction(ef,e),r=t.objectStore(ef);return{transaction:t,objectStore:r}}),this.options=eP(t),this.namespace=e,this.logger=this.options.logger,!window.indexedDB)throw new ew;this.db=this.startDB(),this.db.catch(()=>{}),this.globalEventLimitGuard=new eU(this.options.maxEventLimit,this.namespace,this.logger,this.deleteItem)}storeType(){return eb.INDEXEDDB}}class eK{constructor(e,t){if((0,s.A)(this,"insertItemsToMemoryStore",(e,t)=>{switch(t){case e_.ABANDON:return this.handleAbandonIfLimitWillExceedPolicy(e);case e_.EVICT:return Promise.resolve(this.handleEvictOldestIfLimitExceededPolicy(e));case e_.IGNORE:return this.handleAddAsManyAsPossible(e)}}),e>0)this.eventLimit=e;else throw Error("Event Limit has to be set higher than 1");this.memoryItemHandlers=t}async handleAbandonIfLimitWillExceedPolicy(e){if(await this.memoryItemHandlers.getItemCount()+e.length>this.eventLimit)throw new eO(eb.MEMORY);return this.memoryItemHandlers.addItems(e),{items:e,numberOfEvictedItems:0}}handleEvictOldestIfLimitExceededPolicy(e){return this.memoryItemHandlers.addItems(e),{items:e,numberOfEvictedItems:this.memoryItemHandlers.evictEventsIfNeeded(this.eventLimit)}}async handleAddAsManyAsPossible(e){let t=this.eventLimit-await this.memoryItemHandlers.getItemCount(),r=t>e.length?e:e.slice(0,t);return this.memoryItemHandlers.addItems(r),{items:r,numberOfEvictedItems:0}}}let eG=["item"],e$=["items"];function ez(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}class eW{constructor(e,t={}){this.namespace=e,this.memoryStore=[],this.options=eP(t),this.globalEventLimitGuard=new eK(this.options.maxEventLimit,{addItems:this.addItems.bind(this),getItemCount:this.getItemCount.bind(this),evictEventsIfNeeded:this.evictEventsIfNeeded.bind(this)})}async addItem(e,t={},r=e_.ABANDON){if(r===e_.IGNORE)throw new eA(r,"IndexedDbConnector#addItem");let s=eT(e,this.namespace,t),n=await this.globalEventLimitGuard.insertItemsToMemoryStore([s],r);return Promise.resolve({item:n.items[0],numberOfEvictedItems:n.numberOfEvictedItems})}bulkAddItem(e,t=e_.ABANDON){let r=e.map(e=>{let{item:t}=e,r=(0,ej.A)(e,eG);return eT(t,this.namespace,r)});return this.bulkAddItemWrapperType(r,t)}bulkAddItemWrapperType(e,t=e_.ABANDON){return Promise.resolve(this.globalEventLimitGuard.insertItemsToMemoryStore(e,t))}getItems(e=ex){return Promise.resolve(this.synchronousGetItems(e))}synchronousGetItems(e=ex){let t=e>0?e:ex,r=Date.now(),n=[],i=[];for(let e of this.memoryStore)if(e.timeToBeProcessedAfter<=r&&(n.push(function(e){for(var t=1;t=this.options.maxAttempts&&i.push(e)),n.length>=t)break;return i.forEach(e=>{let t=this.memoryStore.indexOf(e);this.memoryStore.splice(t,1)}),{items:n,numberOfDeletedItems:i.length}}deleteItems(e){return this.memoryStore=this.memoryStore.filter(t=>!e.includes(t.id)),Promise.resolve(void 0)}getItemCount(){let e=Date.now();return Promise.resolve(this.memoryStore.filter(t=>t.timeToBeProcessedAfter<=e).length)}async processItems(e,t){let r=this.synchronousGetItems(t),{items:s}=r,n=(0,ej.A)(r,e$),i=s.map(e=>e.id);try{let t=await e(s,n);return await this.deleteItems(i),t}catch(e){throw new eE(e)}}storeType(){return eb.MEMORY}addItems(e){this.memoryStore.push(...e),this.memoryStore.sort(function(e,t){return e.timeAdded-t.timeAdded})}evictEventsIfNeeded(e){let t=this.memoryStore.length;if(t>e){let r=t-e;return this.memoryStore.splice(0,r),r}return 0}}let eq=class{constructor(e,t={}){if(this.namespace=e,this.options=eP(t),!e||0===e.length||"string"!=typeof e)throw Error("Invalid namespace provided");this.resilience=this.getResilienceMechanism(e,t)}getResilienceMechanism(e,t){if(!t.useMemory)try{return new eV(e,t)}catch(e){if(!(e instanceof ew)){var r;null===(r=t.logger)||void 0===r||r.warn("Attempted to create IndexedDbResilience but failed. Using memory instead.")}}return new eW(this.namespace,t)}addItem(e,t,r=e_.ABANDON){return this.runOrFailOver(()=>this.resilience.addItem(e,t,r))}bulkAddItem(e,t=e_.ABANDON){return this.runOrFailOver(()=>this.resilience.bulkAddItem(e,t))}getItems(e){return this.runOrFailOver(()=>this.resilience.getItems(e))}deleteItems(e){return this.runOrFailOver(()=>this.resilience.deleteItems(e))}getItemCount(){return this.runOrFailOver(()=>this.resilience.getItemCount())}processItems(e,t){return this.runOrFailOver(()=>this.resilience.processItems(e,t))}storeType(){return this.resilience.storeType()}async runOrFailOver(e){try{return await e()}catch(t){if(eI(t))throw t;return this.resilience.storeType()===eb.INDEXEDDB&&await this.failOver(),e()}}async failOver(){let e=this.resilience,t=new eW(this.namespace,this.options);this.resilience=t;try{let{items:r}=await e.getItems(this.options.maxEventLimit);if(r.length>0){let s=(await t.bulkAddItemWrapperType(r,e_.IGNORE)).items.map(e=>e.id);await e.deleteItems(s)}}catch(e){this.options.logger.warn("Unexpected error from ResilienceDb, switching to MemoryDb")}}},eH=function(e){return e.INDEXEDDB="indexeddb",e.MEMORY="memory",e}({}),eJ=function(e){return e[e.ONLINE=0]="ONLINE",e[e.OFFLINE=1]="OFFLINE",e}({});class eQ{constructor(){(0,s.A)(this,"itemsDiscardedByRetry",0),(0,s.A)(this,"eventCount",0),(0,s.A)(this,"itemsDiscardedByOverflow",0),(0,s.A)(this,"resilienceMechanism",eH.INDEXEDDB),(0,s.A)(this,"localstorageNumberOfQueuesPurged",0),(0,s.A)(this,"localstorageNumberOfFullReclaims",0),(0,s.A)(this,"localstorageNumberOfPartialReclaims",0),(0,s.A)(this,"localstorageNumberOfFailedReclaims",0)}addToItemsDiscardedByRetryCounter(e=1){this.itemsDiscardedByRetry+=e}addToEventCount(){this.eventCount++}addToItemsDiscardedByOverflowCounter(e=1){this.itemsDiscardedByOverflow+=e}setResilienceMechanism(e){this.resilienceMechanism=e}addToReclaimMetrics(e){this.localstorageNumberOfFullReclaims+=e.fullReclaims,this.localstorageNumberOfPartialReclaims+=e.partialReclaims,this.localstorageNumberOfFailedReclaims+=e.failedReclaims}addToPurgedQueuesMetrics(e){this.localstorageNumberOfQueuesPurged+=e}subtractFromMetrics(e){this.itemsDiscardedByRetry=this.subtractFromCount(this.itemsDiscardedByRetry,e.itemsDiscardedByRetry),this.eventCount=this.subtractFromCount(this.eventCount,e.eventCount),this.itemsDiscardedByOverflow=this.subtractFromCount(this.itemsDiscardedByOverflow,e.itemsDiscardedByOverflow),this.localstorageNumberOfFullReclaims=this.subtractFromCount(this.localstorageNumberOfFullReclaims,e.fullReclaims),this.localstorageNumberOfPartialReclaims=this.subtractFromCount(this.localstorageNumberOfPartialReclaims,e.partialReclaims),this.localstorageNumberOfFailedReclaims=this.subtractFromCount(this.localstorageNumberOfFailedReclaims,e.failedReclaims),this.localstorageNumberOfQueuesPurged=this.subtractFromCount(this.localstorageNumberOfQueuesPurged,e.localstorageQueuesPurged)}subtractFromCount(e,t){return Math.max(e-(t||0),0)}getMetricsPayload(){return{itemsDiscardedByRetry:this.itemsDiscardedByRetry,eventCount:this.eventCount,itemsDiscardedByOverflow:this.itemsDiscardedByOverflow,resilienceMechanism:this.resilienceMechanism,localstorageQueuesPurged:this.localstorageNumberOfQueuesPurged,fullReclaims:this.localstorageNumberOfFullReclaims,partialReclaims:this.localstorageNumberOfPartialReclaims,failedReclaims:this.localstorageNumberOfFailedReclaims}}}let eY=null,eX=()=>(eY||(eY=new eQ),eY);class eZ{constructor(e){this._networkChangeCallback=e,"undefined"!=typeof window&&(window.addEventListener("offline",()=>this._networkChangeCallback(eJ.OFFLINE)),window.addEventListener("online",()=>this._networkChangeCallback(eJ.ONLINE)))}removeListeners(){"undefined"!=typeof window&&(window.addEventListener("offline",()=>this._networkChangeCallback(eJ.OFFLINE)),window.addEventListener("online",()=>this._networkChangeCallback(eJ.ONLINE)))}getNetworkStatus(){return window.navigator.onLine?eJ.ONLINE:eJ.OFFLINE}}let e0=function(e){return e.IDLE="idle",e.RUNNING="running",e.COMPLETED="completed",e.TIMED_OUT="timedOut",e}({}),e2=function(e){return e.EXECUTE="execute",e.COMPLETE="complete",e.TIMEOUT="timeout",e}({});class e1{constructor(e){if((0,s.A)(this,"timeoutHandle",void 0),(0,s.A)(this,"callbackStatus",e0.IDLE),e>0){this.timeoutPeriod=e;return}throw Error("CallbackWithTimeout requires timeout period higher than 0")}transitionCallbackStatus(e,t){switch(e){case e0.IDLE:case e0.TIMED_OUT:case e0.COMPLETED:t===e2.EXECUTE&&(this.callbackStatus=e0.RUNNING);break;case e0.RUNNING:switch(t){case e2.COMPLETE:this.callbackStatus=e0.COMPLETED;break;case e2.TIMEOUT:this.callbackStatus=e0.TIMED_OUT}break;default:this.callbackStatus=e}}executeCallbackWithTimeout(e,t,r){"undefined"!=typeof window&&(this.transitionCallbackStatus(this.callbackStatus,e2.EXECUTE),this.timeoutHandle=window.setTimeout(()=>{this.transitionCallbackStatus(this.callbackStatus,e2.TIMEOUT),r()},this.timeoutPeriod),e(e=>{this.cancelTimeout(),this.getCallbackStatus()!==e0.TIMED_OUT&&(this.transitionCallbackStatus(this.callbackStatus,e2.COMPLETE),t(e))}))}getCallbackStatus(){return this.callbackStatus}cancelTimeout(){"undefined"!=typeof window&&this.timeoutPeriod>0&&this.timeoutHandle&&(window.clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0)}}let e4=function(e){return e[e.NOOP=0]="NOOP",e[e.SUCCESS=1]="SUCCESS",e[e.ERROR=2]="ERROR",e}({}),e5={minRetryDelay:1e3,maxRetryDelay:3e4,backoffFactor:2,backoffJitterPercentage:0,waitInterval:500,callbackTimeoutPeriod:5e3},e3=function(e){return e[e.NONE=0]="NONE",e[e.IMMEDIATE=1]="IMMEDIATE",e[e.WAIT=2]="WAIT",e}({});class e6{constructor(e,t){(0,s.A)(this,"schedule",({immediate:e}={})=>{"undefined"!=typeof window&&(this.operationInFlight?e?this.queuedSchedule=e3.IMMEDIATE:this.queuedSchedule!==e3.IMMEDIATE&&(this.queuedSchedule=e3.WAIT):(e||this.options.waitInterval<=0)&&0===this.failureCount?(this.clearTimeout(),this.run()):this.failureCount>0&&null===this.scheduledTimeout?this.scheduledTimeout=window.setTimeout(this.run,this.calculateBackoff()):null===this.scheduledTimeout&&(this.scheduledTimeout=window.setTimeout(this.run,this.options.waitInterval)))}),(0,s.A)(this,"stop",()=>{this.clearTimeout(),this.queuedSchedule=e3.NONE}),(0,s.A)(this,"getFailureCount",()=>this.failureCount),(0,s.A)(this,"getCallbackStatus",()=>this.callbackTimer.getCallbackStatus()),(0,s.A)(this,"clearTimeout",()=>{"undefined"!=typeof window&&null!==this.scheduledTimeout&&(window.clearTimeout(this.scheduledTimeout),this.scheduledTimeout=null)}),(0,s.A)(this,"run",()=>{this.operationInFlight=!0,this.clearTimeout();try{this.callbackTimer.executeCallbackWithTimeout(this.callback,this.done,()=>this.done(e4.ERROR))}catch(e){this.done(e)}}),(0,s.A)(this,"done",e=>{this.operationInFlight=!1,e===e4.ERROR||this.callbackTimer.getCallbackStatus()===e0.TIMED_OUT?(this.failureCount++,this.clearTimeout()):e===e4.SUCCESS&&(this.failureCount=0),this.processQueuedSchedule()}),(0,s.A)(this,"processQueuedSchedule",()=>{if(this.queuedSchedule!==e3.NONE){let e=this.queuedSchedule===e3.IMMEDIATE;this.queuedSchedule=e3.NONE,this.schedule({immediate:e})}else this.failureCount>0&&this.schedule()}),(0,s.A)(this,"calculateBackoff",()=>{let{minRetryDelay:e,maxRetryDelay:t,backoffFactor:r,backoffJitterPercentage:s}=this.options,n=e*r**this.failureCount;if(s){let e=Math.random(),t=Math.floor(e*s*n);5>Math.floor(10*e)?n-=t:n+=t}return Number(Math.min(n,t).toPrecision(1))}),this.options={minRetryDelay:e.minRetryDelay||e5.minRetryDelay,maxRetryDelay:e.maxRetryDelay||e5.maxRetryDelay,backoffFactor:e.backoffFactor||e5.backoffFactor,backoffJitterPercentage:e.backoffJitterPercentage||e5.backoffJitterPercentage,waitInterval:void 0!==e.waitInterval?e.waitInterval:e5.waitInterval,callbackTimeoutPeriod:e.callbackTimeoutPeriod||e5.callbackTimeoutPeriod},this.scheduledTimeout=null,this.failureCount=0,this.callback=t,this.operationInFlight=!1,this.queuedSchedule=e3.NONE,this.callbackTimer=new e1(this.options.callbackTimeoutPeriod)}}function e7(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function e8(e){for(var t=1;t{e===eJ.OFFLINE?this.scheduler.stop():this.checkEventCountAndReschedule()})}start(e){this.batchFlushCallback=e,this.longPollingScheduler.schedule()}stop(){this.scheduler.stop(),this.longPollingScheduler.stop()}async addItem(e){let t=JSON.parse(JSON.stringify(e)),{numberOfEvictedItems:r}=await this.resilience.addItem(t,{},e_.EVICT);this.scheduler.schedule(),this.metricsCollector.addToEventCount(),r>0&&this.metricsCollector.addToItemsDiscardedByOverflowCounter(r)}getGlobalRetryCount(){return this.scheduler.getFailureCount()}async scheduleCallback(e){if(this.networkStatus.getNetworkStatus()===eJ.OFFLINE){e(e4.NOOP);return}try{let t=await this.resilience.processItems(this.flush.bind(this),this.options.batchFlushSize);e(t)}catch(t){if(t.name===ek){e(e4.ERROR);return}}finally{await this.checkEventCountAndReschedule()}}async checkEventCountAndReschedule(){let e=await this.resilience.getItemCount();e>0&&this.scheduler.schedule({immediate:e>=this.options.batchFlushSize})}async scheduleLongCallBack(e){let t=ei(this.queuePrefix);this.metricsCollector.addToPurgedQueuesMetrics(t);let r=await ep(this.queuePrefix,async e=>{let t=e.map(e=>({item:e.item,retryAttempts:e.attemptNumber,id:e.id})),{items:r}=await this.resilience.bulkAddItem(t,e_.IGNORE);return r.length===t.length?{status:"successful"}:{status:"partial",acceptedItemIds:r.map(e=>e.id)}});this.metricsCollector.addToReclaimMetrics(r),await this.checkEventCountAndReschedule(),e(e4.SUCCESS),this.longPollingScheduler.schedule()}flush(e,t){this.metricsCollector.setResilienceMechanism(this.resilience.storeType());let{batchFlushCallback:r}=this;if(!r)throw Error("batchFlushCallback has not been set. Call PullBatchableQueue#start first.");return new Promise((s,n)=>{if(e.length<=0){s(e4.NOOP);return}r(e.map(e=>{let t=e.item;return e.retryAttempts>0&&t.msg&&(t.msg._metadata||(t.msg._metadata={}),t.msg._metadata.failedAttempts=e.retryAttempts),t}),e=>{e?(t.numberOfDeletedItems>0&&this.metricsCollector.addToItemsDiscardedByRetryCounter(t.numberOfDeletedItems),n(e)):s(e4.SUCCESS)})})}buildOptions(e){return{backoffFactor:(null==e?void 0:e.backoffFactor)||te.backoffFactor,backoffJitterPercentage:(null==e?void 0:e.backoffJitterPercentage)!==void 0?e.backoffJitterPercentage:te.backoffJitterPercentage,batchFlushSize:(null==e?void 0:e.batchFlushSize)||te.batchFlushSize,flushBeforeUnload:(null==e?void 0:e.flushBeforeUnload)||te.flushBeforeUnload,flushWaitMs:(null==e?void 0:e.flushWaitMs)||te.flushWaitMs,maxItems:(null==e?void 0:e.maxItems)||te.maxItems,maxAttempts:(null==e?void 0:e.maxAttempts)||te.maxAttempts,maxRetryDelay:(null==e?void 0:e.maxRetryDelay)||te.maxRetryDelay,minRetryDelay:(null==e?void 0:e.minRetryDelay)||te.minRetryDelay}}}let tr=(e,t,r,s)=>new tt(e,t,r||{},s);class ts{constructor(e,t){this.reason=e,this.message=t instanceof Error?t.message:null,this.statusCode=t instanceof to?t.statusCode:null}}let tn=function(e){return e.IDENTIFY="identify",e.PAGE="page",e.TRACK="track",e}({});class ti{constructor(e,t){this.props=e,this.url=t}static fromJson(e){let t;let r="string"==typeof(t=null==e?void 0:e.url)||t instanceof String?e.url.trim():"";return new ti((null==e?void 0:e.props)||null,r.startsWith("http")?r:null)}}class to extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.statusText=r}}let ta=["FetchError","AbortError","TypeError"];function tl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function tc(e){for(var t=1;t(function(e,t){if(!(t&&t instanceof Function))return e;if(e.msg.type===tn.PAGE||e.msg.type===tn.TRACK){let r=t();r&&Array.isArray(r)&&(e.msg.properties=tc(tc({},e.msg.properties),{},{xid:r}))}else if(e.msg.traits&&e.msg.type===tn.IDENTIFY){let r=t();r&&Array.isArray(r)&&(e.msg.traits=tc(tc({},e.msg.traits),{},{xid:r}))}return e})(e,r))}catch(t){return e}}let td=new Map([[200,"OK"],[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[403,"Forbidden"],[404,"Not Found"],[405,"Method Not Allowed"],[406,"Not Acceptable"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Payload Too Large"],[414,"URI Too Long"],[415,"Unsupported Media Type"],[416,"Requested range not satisfiable"],[417,"Expectation Failed"],[418,"I'm a teapot"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[425,"Too Early"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields Too Large"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"HTTP Version not supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[509,"Bandwidth Limit Exceeded"],[510,"Not Extended"],[511,"Network Authentication Required"],[-1,"Unknown Status"]]);var th=r("./node_modules/memoize-one/dist/memoize-one.esm.js");function tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}let tm=async e=>{var t;let r=null===(t=tf(e))||void 0===t?void 0:t.signal,n=tg(e.url),i=await fetch(e.url,function(e){for(var t=1;t=500&&i.status<600)throw new to(`HTTP Error ${i.status} (${i.statusText})`,i.status,i.statusText);return i},tf=e=>{if(e.abortController)return e.abortController;if(e.timeout){let t=new AbortController;return setTimeout(()=>{t.abort()},e.timeout),t}},tg=(0,th.A)(e=>new URL(e).origin===location.origin?{}:{mode:"cors",credentials:"include"});var ty=r("./node_modules/date-fns/esm/toDate/index.js"),tv=r("./node_modules/date-fns/esm/differenceInCalendarDays/index.js"),tb=r("./node_modules/date-fns/esm/_lib/requiredArgs/index.js");function t_(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}var tw=r("./node_modules/js-cookie/src/js.cookie.js"),tC=r.n(tw);let tO=function(e){return e.AWC_TLD_TEST="AWC_TLD_TEST",e.AWC_ANALYTICS_DEBUG="AWC_ANALYTICS_DEBUG",e.AJS_ANONYMOUS_ID="AJS_ANONYMOUS_ID",e}({});class tk{constructor(e,t){this.key=e,this.options=t}getAttributes(){return this.options}getKey(){return this.key}}let tE=()=>{try{return window&&window.location&&"https:"===window.location.protocol}catch(e){return!1}},tS={[tO.AWC_TLD_TEST]:new tk("__awc_tld_test__",{expires:365,secure:tE(),path:"/"}),[tO.AWC_ANALYTICS_DEBUG]:new tk("atlassian_analytics_debug",{expires:365,secure:tE(),path:"/"}),[tO.AJS_ANONYMOUS_ID]:new tk("ajs_anonymous_id",{expires:365,secure:tE(),path:"/"})},tA=new class{constructor(){(0,s.A)(this,"_data",{}),(0,s.A)(this,"length",0),(0,s.A)(this,"setItem",(e,t)=>(this._data[e]=t,this.length=Object.keys(this._data).length,t)),(0,s.A)(this,"getItem",e=>e in this._data?this._data[e]:null),(0,s.A)(this,"removeItem",e=>(e in this._data&&delete this._data[e],this.length=Object.keys(this._data).length,null)),(0,s.A)(this,"clear",()=>{this._data={},this.length=0}),(0,s.A)(this,"key",e=>Object.keys(this._data)[e])}},tI="awcInMemoryStorageFallback";function tj(e){let t="test_value";if(!e)return!1;try{let r="awc.storage.support";e.setItem(r,t);let s=e.getItem(r);return e.removeItem(r),s===t}catch(e){return!1}}class tx{constructor(e,t={}){(0,s.A)(this,"getStore",()=>this._store),(0,s.A)(this,"getItem",e=>this._store.getItem(this.createKey(e))),(0,s.A)(this,"removeItem",e=>this._store.removeItem(this.createKey(e))),(0,s.A)(this,"setItem",(e,t)=>{try{this._store.setItem(this.createKey(e),t)}catch(r){(function(e){let t=!1;if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else -2147024882===e.number&&(t=!0);return t})(r)&&(this.swapToInMemory(),this._store.setItem(this.createKey(e),t))}}),(0,s.A)(this,"swapToInMemory",()=>{let e;if(this._store===tA||"undefined"==typeof window)return;let t=Object.keys(this._store||{});tj(window[tI])?e=window[tI]:(e=tA,window[tI]||(window[tI]=tA)),t.forEach(t=>{if(0===t.indexOf(this.getPrefix())){let r=this._store.getItem(t);r&&e.setItem(t,r)}}),this._store=e}),(0,s.A)(this,"clear",()=>this._store.clear()),(0,s.A)(this,"key",e=>this._store.key(e)),(0,s.A)(this,"getPrefix",()=>this._prefix),(0,s.A)(this,"createKey",e=>this._prefix?`${this.getPrefix()}.${e}`:e),this.options=t;let r=[];(void 0===t.useStoragePrefix||t.useStoragePrefix)&&r.push("awc"),t.envPrefix&&t.envPrefix!==o.sR.PROD&&r.push(t.envPrefix),this._prefix=r.join("-"),tj(e)?this._store=e:this.swapToInMemory()}}let tT=class extends tx{constructor(e){let t;try{t=window.localStorage||tA}catch(e){t=tA}super(t,e)}};class tP{constructor(){this.safeStorage=new tT({useStoragePrefix:!1})}set(e,t){return this.safeStorage.setItem(e,t),t}get(e){return this.safeStorage.getItem(e)||void 0}remove(e){this.safeStorage.removeItem(e)}}let tD=(e=!1)=>!e&&!("file:"===location.protocol||"chrome-extension:"===location.protocol),tR=tS.AWC_TLD_TEST.getKey(),tL="tld_test",tN=(0,th.A)(()=>{if("undefined"==typeof location)return"";let{hostname:e}=location,t=e.split(".");for(let e=1;e<=t.length;e++){let r=t.slice(-1*e),s=`.${r.join(".")}`;if(tC().set(tR,tL,{domain:s}),tC().get(tR)===tL)return tC().remove(tR,{domain:s}),s}return e});function tU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function tM(e){for(var t=1;t=7)&&(t=!0),e.type){case tB:return t&&this.setAnonymousId(e.anonymousId),e.anonymousId;case tV:return e.anonymousId;default:return null}}getAnonymousIdFromCookieAndUpdateLocalStorage(){let e=this.getAnonymousIdFromStorage("COOKIE");switch(e.type){case tB:case tV:return this.store.setItem(tS.AJS_ANONYMOUS_ID.getKey(),JSON.stringify(e.anonymousId)),e.anonymousId;default:return null}}generateNewAnonymousId(e=i()){let t=e();return this.setAnonymousId(t),t}}var t$=r("./node_modules/@segment/isodate-traverse/lib/index.js"),tz=r.n(t$);function tW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function tq(e){for(var t=1;ttq(tq({},e.context),{},{userAgent:navigator.userAgent}),tJ=e=>{let t=tQ(e);return tz()(t)},tQ=e=>{if(null===e||"object"!=typeof e)return e;let t={};return Object.keys(e).forEach(r=>{let s=tY(e,r);void 0!==s&&(Array.isArray(s)?t[r]=s.map(e=>tQ(e)):"object"==typeof s&&null!==s?t[r]=tQ(s):t[r]=s)}),t},tY=(e,t)=>e[t];function tX(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function tZ(e){for(var t=1;t{var r,s;if(!1===this.options.enableEventCalls)return;let n=this.resilienceQueue.getGlobalRetryCount(),i=this.metrics.getMetricsPayload(),o=await this.attachXIDs(e),a=new Date().toISOString(),l=await this.metadataClient.getMetadataAsync(),[c,u]=this.getEventUrl(l),d=tZ(tZ({},i),{},{httpRetryCount:n,lastSendEventsErrorReason:(null===(r=this.lastSendEventsError)||void 0===r?void 0:r.message)||null,lastSendEventsError:this.lastSendEventsError,lastUrlFallbackError:this.lastUrlFallbackError,isUsingFallbackUrl:u,props:(null==l?void 0:l.props)||null,metadataClientMetrics:(null===(s=this.metadataClient)||void 0===s?void 0:s.metrics)||null});this.cleanLibraryMetadata(d);let h=o.map(e=>(e.msg.sentAt=a,e.msg));try{let r=await tm({url:c,batch:{batch:h,sentAt:a,metadata:d},timeout:this.options.requestTimeout});this.lastSendEventsError=null,this.lastUrlFallbackError=null,this.metrics.subtractFromMetrics(i),t(null,r),await this.invokeLocalResponseCallbackAsync(e,r,null)}catch(r){if(r instanceof to&&[429,503].includes(r.statusCode))this.lastSendEventsError=new ts("ServerBusyError",r);else{let e=r instanceof Error&&ta.includes(r.name)?r.name:"Unknown";this.lastSendEventsError=new ts(e,r),this.useUrlFromMetadata=!1;let[t,s]=this.getEventUrl(l);s&&s!==u&&(this.lastUrlFallbackError=this.lastSendEventsError)}t(r,null),await this.invokeLocalResponseCallbackAsync(e,null,r)}}),this.options=tZ(tZ({},e),{},{requestTimeout:e.requestTimeout||1e4,retryQueueOptions:e.retryQueueOptions||{},logger:e.logger||console,disableCookiePersistence:e.disableCookiePersistence||!1,env:e.env,perimeter:e.perimeter||"",enableMetadataCalls:"boolean"!=typeof e.enableMetadataCalls||e.enableMetadataCalls,enableEventCalls:"boolean"!=typeof e.enableEventCalls||e.enableEventCalls}),this.user=new tG(null===(t=this.options)||void 0===t?void 0:t.disableCookiePersistence),this.xidPromiseCallback=e.xidPromiseGetter(),this.gasv3BatchUrl=`${e.apiHostProtocol}://${e.apiHost}/batch`,this.metrics=eX(),this.responseCallback=e.responseCallback,this.resilienceQueue=tr(e.retryQueuePrefix,e.product,this.options.retryQueueOptions,this.options.logger),this.metadataClient=e.metadataClient,this.useUrlFromMetadata=!0,this.lastSendEventsError=null,this.lastUrlFallbackError=null,setInterval(()=>{this.useUrlFromMetadata=!0},6e5),this.resilienceQueue.start(this.sendEvents)}getUser(){return this.user}async track(e,t,r,s){let n=tZ(tZ({},this.buildBaseEvent(r,tn.TRACK,t)),{},{type:tn.TRACK,properties:tJ(t),event:e}),i=tZ(tZ({},n),{},{messageId:this.createMessageId()}),o=this.packageEvent(i);await this.enqueueEvent(o),s&&s()}async page(e,t,r,s){let n=tZ(tZ({},this.buildBaseEvent(r,tn.PAGE,t)),{},{type:tn.PAGE,properties:tJ(t),name:e}),i=tZ(tZ({},n),{},{messageId:this.createMessageId()}),o=this.packageEvent(i);await this.enqueueEvent(o),s&&s()}async identify(e,t,r,s){let n=tZ(tZ({},this.buildBaseEvent(r,tn.IDENTIFY,t)),{},{type:tn.IDENTIFY,traits:tJ(t)}),i=tZ(tZ({},n),{},{messageId:this.createMessageId()}),o=this.packageEvent(i);await this.enqueueEvent(o),s&&s()}async enqueueEvent(e){this.options.enableMetadataCalls&&this.metadataClient.start(!1),await this.resilienceQueue.addItem(e)}buildBaseEvent(e,t,r){return{context:tH(tJ(e)),timestamp:new Date().toISOString(),type:t,userId:this.user.getUserId(),anonymousId:r.anonymousId||this.user.getAnonymousId()}}createMessageId(){return`ajs-${i()()}`}packageEvent(e){let{apiHost:t,apiHostProtocol:r}=this.options;return{headers:{"Content-Type":"text/plain"},msg:e,url:`${r}://${t}/${e.type.charAt(0)}`}}getEventUrl(e){let t=null!=e&&e.url?e.url:this.gasv3BatchUrl,r=this.useUrlFromMetadata?t:this.gasv3BatchUrl,s=t===this.gasv3BatchUrl?null:r!==t;return[r,s]}cleanLibraryMetadata(e){if(null!==e&&"object"==typeof e)for(let t in e){let r=e[t];null==r?delete e[t]:"number"==typeof r&&0===r?delete e[t]:Array.isArray(r)?0===r.length?delete e[t]:r.forEach(e=>{this.cleanLibraryMetadata(e)}):"object"==typeof r&&this.cleanLibraryMetadata(e[t])}}async invokeLocalResponseCallbackAsync(e,t,r){let s=this.responseCallback;if(s){let i=null;if(t){var n;let e;try{e=await t.clone().json()}catch(e){}(e=e||{}).code=Number.parseInt(e.code)>0?Number.parseInt(e.code):t.status,e.success=e.success||e.code>=200&&e.code<=299,i=new t0(e.success,e.validationErrors||new Map,new t2((null===(n=e.message)||void 0===n?void 0:n.error)||""),e.code,e.validationReports||null)}!r||r instanceof Error||(r=Error(String(r))),s(t3.toAnalyticsResponse(e||[],r||null,i))}}async attachXIDs(e){return this.xidPromiseCallback?tu(e,this.xidPromiseCallback):Promise.resolve(e)}setResponseCallback(e){this.responseCallback=e}refreshMetadata(e,t){this.metadataClient.userInfo=e,this.metadataClient.tenantInfo=t}}class t3{static toAnalyticsResponse(e,t,r){let s=[];if(null!==r){var n,i;let[t,o]=[r.code,r.success];if(t>=200&&t<=299)return null===(n=r.validationReports)||void 0===n||n.forEach(t=>{let r=e.find(e=>e.msg.messageId===t.messageId);r&&s.push(new t4(r.msg.messageId,t.results,r.msg))}),new t1(o,t,td.get(t),s);if(t>=400&&t<=499){let n=(null===(i=r.message)||void 0===i?void 0:i.error)!==null?r.message.error:td.has(t)?td.get(t):td.get(-1);return e.forEach(e=>{s.push(new t4(e.msg.messageId,[],e.msg))}),new t1(o,t,n,s)}}else if(null!=t&&t.message){let r=t.message.match(t3.http_error_regex);if(r)return e.forEach(e=>{s.push(new t4(e.msg.messageId,[],e.msg))}),new t1(!1,Number(r[1]),r[2],s)}return e.forEach(e=>{s.push(new t4(e.msg.messageId,[],e.msg))}),new t1(!1,-1,td.get(-1),s)}}(0,s.A)(t3,"http_error_regex",/HTTP Error\s([0-9]{3})\s\((.+)\)/);let t6="/gateway/api/gasv3/api/v1",t7=()=>"as.staging.atl-paas-us-gov-mod.net/api/v1",t8=()=>"api.stg.atlassian-us-gov-mod.com/gasv3/api/v1",t9=({useStargate:e,env:t,useLegacyUrl:r,envOverride:s})=>{if(t===o.sR.LOCAL||t===o.sR.DEV)throw Error("No LOCAL or DEV environments for FedRAMP.");if(t===o.sR.PROD&&s)throw Error("Cannot override to FedRAMP Sandbox for Prod.");return e?r?t===o.sR.PROD?"api.atlassian-us-gov-mod.com/gasv3/api/v1":t8():window.location.host+t6:t===o.sR.PROD?"as.atlassian-us-gov-mod.com/api/v1":t7()},re=({useStargate:e,env:t,useLegacyUrl:r})=>e?r?t===o.sR.PROD?"api-private.atlassian.com/gasv3/api/v1":"api-private.stg.atlassian.com/gasv3/api/v1":window.location.host+t6:t===o.sR.PROD?"as.atlassian.com/api/v1":"as.staging.atl-paas.net/api/v1";class rt{static isGeminiVREnvironment(){try{for(let e in r.g)if(e.startsWith("__gemini_")&&e.endsWith("__"))return!0}catch(e){}return!1}static areMetadataCallsDisabled(){return this.areFetchCallsDisabled()||this.getGlobalBooleanProperty(rt.DISABLE_METADATA_CALLS_PROPERTY)}static areEventCallsDisabled(){return this.areFetchCallsDisabled()||this.getGlobalBooleanProperty(rt.DISABLE_EVENT_CALLS_PROPERTY)}static areFetchCallsDisabled(){return this.getGlobalBooleanProperty(rt.DISABLE_FETCH_CALLS_PROPERTY)}static getGlobalBooleanProperty(e){return!!(r.g&&r.g.hasOwnProperty(e))&&!0===r.g[e]}}function rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}(0,s.A)(rt,"DISABLE_METADATA_CALLS_PROPERTY","__awc_disable_metadata_calls__"),(0,s.A)(rt,"DISABLE_EVENT_CALLS_PROPERTY","__awc_disable_event_calls__"),(0,s.A)(rt,"DISABLE_FETCH_CALLS_PROPERTY","__awc_disable_fetch_calls__");let rs=async(e,t,r,n)=>{var i,o,a,l;let c=rn(r,n),u=ri(e),d=e+"?"+new URLSearchParams({product:`${t.product}`,userId:`${(null===(i=t.userInfo)||void 0===i?void 0:i.userId)||""}`,userIdType:`${(null===(o=t.userInfo)||void 0===o?void 0:o.userIdType)||""}`,tenantId:`${(null===(a=t.tenantInfo)||void 0===a?void 0:a.tenantId)||""}`,tenantIdType:`${(null===(l=t.tenantInfo)||void 0===l?void 0:l.tenantIdType)||""}`}).toString(),h=await fetch(d,function(e){for(var t=1;t{let r=new AbortController;return setTimeout(()=>{r.abort()},e||3e4),null==t||t.addEventListener("abort",()=>{r.abort()}),r},ri=(0,th.A)(e=>new URL(e).origin===location.origin?{}:{mode:"cors",credentials:"include"});function ro(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function ra(e){for(var t=1;t{this._scheduler.schedule({immediate:!0})},rl.INITIAL_REFRESH_DELAY))}stop(){var e;this._isEnabled&&(this._hasBeenStopped=!0,this._isEnabled=!1,this.stopNetworkStatusMonitor(),this._scheduler.stop(),null===(e=this._fetchAbortController)||void 0===e||e.abort(),this.resetPropertyChangeRefresh())}startNetworkStatusMonitor(){this._networkStatus||(this._networkStatus=new eZ(e=>{e===eJ.OFFLINE?this._scheduler.stop():this._isEnabled&&this._scheduler.schedule({immediate:null===this._metadataInfo})}))}stopNetworkStatusMonitor(){this._networkStatus&&(this._networkStatus.removeListeners(),this._networkStatus=null)}async refreshMetadataAsync(){var e;if(rt.areFetchCallsDisabled()||!this._isEnabled)return Promise.resolve();null===(e=this._fetchAbortController)||void 0===e||e.abort(),this._fetchAbortController=new AbortController;let t=this._fetchAbortController.signal;this._lastFetchRequestCount=this._scheduler.getFailureCount(),await rs(this._url,{product:this._product,userInfo:this._userInfo,tenantInfo:this._tenantInfo},6e4,t).then(async e=>{let t=await e.json();this._metadataInfo=ti.fromJson(t),this._lastFetchRequestCount++,this._requestStatus="FETCHED",this._lastErrorReason=null}).catch(e=>{if(!t.aborted)throw this._requestStatus="FAILED",e instanceof to&&[429,503].includes(e.statusCode)?this._lastErrorReason="ServerBusyError":this._lastErrorReason=e instanceof Error&&ta.includes(e.name)?e.name:"Unknown",e})}getMetadataAsync(){return Promise.resolve(this._metadataInfo)}get status(){return this._requestStatus}get lastErrorReason(){return this._lastErrorReason}get lastFetchRequestCount(){return this._lastFetchRequestCount}get userInfo(){return this._userInfo}set userInfo(e){var t,r;((null===(t=this._userInfo)||void 0===t?void 0:t.userId)!==(null==e?void 0:e.userId)||(null===(r=this._userInfo)||void 0===r?void 0:r.userIdType)!==(null==e?void 0:e.userIdType))&&(this._userInfo=e,this.schedulePropertyChangeRefresh())}get tenantInfo(){return this._tenantInfo}set tenantInfo(e){var t,r;((null===(t=this._tenantInfo)||void 0===t?void 0:t.tenantId)!==(null==e?void 0:e.tenantId)||(null===(r=this._tenantInfo)||void 0===r?void 0:r.tenantIdType)!==(null==e?void 0:e.tenantIdType))&&(this._tenantInfo=e,this.schedulePropertyChangeRefresh())}get metrics(){return{host:this._metadataHost,status:this.status,lastErrorReason:this.lastErrorReason,lastRefreshRequestCount:this.lastFetchRequestCount}}async scheduleCallback(e){var t;if((null===(t=this._networkStatus)||void 0===t?void 0:t.getNetworkStatus())===eJ.OFFLINE){e(e4.NOOP);return}try{await this.refreshMetadataAsync(),e(e4.SUCCESS),this._scheduler.schedule()}catch(t){e(e4.ERROR)}}schedulePropertyChangeRefresh(){this._isEnabled&&(this.resetPropertyChangeRefresh(),this._propertyChangeRefreshTimeout=setTimeout(()=>{this.resetPropertyChangeRefresh(),this._scheduler.schedule({immediate:!0})},10))}resetPropertyChangeRefresh(){this._propertyChangeRefreshTimeout&&(clearTimeout(this._propertyChangeRefreshTimeout),this._propertyChangeRefreshTimeout=null)}buildOptions(e){return{backoffFactor:(null==e?void 0:e.backoffFactor)||te.backoffFactor,backoffJitterPercentage:(null==e?void 0:e.backoffJitterPercentage)!==void 0?e.backoffJitterPercentage:te.backoffJitterPercentage,batchFlushSize:(null==e?void 0:e.batchFlushSize)||te.batchFlushSize,flushBeforeUnload:(null==e?void 0:e.flushBeforeUnload)||te.flushBeforeUnload,flushWaitMs:(null==e?void 0:e.flushWaitMs)||te.flushWaitMs,maxItems:(null==e?void 0:e.maxItems)||te.maxItems,maxAttempts:(null==e?void 0:e.maxAttempts)||te.maxAttempts,maxRetryDelay:(null==e?void 0:e.maxRetryDelay)||te.maxRetryDelay,minRetryDelay:(null==e?void 0:e.minRetryDelay)||te.minRetryDelay}}}(0,s.A)(rl,"INITIAL_REFRESH_DELAY",1),(0,s.A)(rl,"Factory",(e,t,r)=>new rl(e,t,r));var rc=r("./node_modules/query-string/index.js");let ru=e=>window.history.replaceState({},"",e),rd=(e,t=ru)=>{let r=window.location.href,s=window.location.hash,n=""!==s?r.replace(s,""):r,{url:i,query:o}=(0,rc.parseUrl)(n),a=B(o,e);if(Object.keys(a).length>0){let r=F(o,e);t(Object.keys(r).length>0?`${i}?${(0,rc.stringify)(r)}${s}`:`${i}${s}`)}return a};class rh{constructor(){(0,s.A)(this,"handleOriginParameters",(e,t)=>{let r=Object.keys(e);if(!(r.length>0))throw Error("Empty parameter mapping provided");let s=r.filter(e=>0>Object.values(o.D0).indexOf(e));if(s.length>0)throw Error(`Invalid Origin Tracing Parameter(s) supplied: ${s.join()}!`);let n=rd((e,t)=>r.indexOf(t)>=0,t);return Object.keys(n).map(t=>{let r=e[t](n[t]);return{[t]:r}}).reduce((e,t)=>Object.assign(e,t),{})}),this._originStore={}}}let rp="session.id",rm="session.expiry",rf=/^\d+$/,rg=()=>{};class ry{constructor(e={}){(0,s.A)(this,"_generateNewSessionId",()=>{let e=Date.now().toString();return this._safeLocalStorage.setItem(rp,e),this._onNewSessionStarted&&this._onNewSessionStarted(),e}),(0,s.A)(this,"_updateSessionExpiry",()=>{let e=Date.now()+this._sessionExpiryTime;return this._safeLocalStorage.setItem(rm,e.toString()),e}),(0,s.A)(this,"_debouncedUpdateSessionExpiry",e=>{let{_updateSessionExpiry:t}=this;if(e{t()},this._sessionExpiryDebounce)}),this._sessionExpiryTime=e.sessionExpiryTime||18e5,this._sessionExpiryDebounce=e.sessionExpiryDebounce||5e3,this._sessionExpiryDebounceThresholdPercentage=e.sessionExpiryDebounceThresholdPercentage||.9,this._onNewSessionStarted=e.onNewSessionStarted?e.onNewSessionStarted:rg,this._safeLocalStorage=new tT}getCurrentSessionId(){let e=this._safeLocalStorage.getItem(rp),t=parseInt(this._safeLocalStorage.getItem(rm)||"0",10)||0;return(this._debouncedUpdateSessionExpiry(t),!e||t<=Date.now()||Number.isNaN(t)||!rf.test(e))?this._generateNewSessionId():e}}let rv=class extends tx{constructor(e){let t;try{t=window.sessionStorage||tA}catch(e){t=tA}super(t,e)}},rb="tab.id";class r_{constructor(){(0,s.A)(this,"_generateNewTabId",()=>{let e=i()();return this._safeSessionStorage.setItem(rb,e),e}),this._safeSessionStorage=new rv}getCurrentTabId(){let e=this._safeSessionStorage.getItem(rb);return e||(e=this._generateNewTabId()),e}}function rw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function rC(e){for(var t=1;tnull===this._safeSessionStorage.getItem(rO)||null===this._safeSessionStorage.getItem(rk)||parseInt(this._safeSessionStorage.getItem(rk)||"0",10)t.split(rE)[1]),(0,s.A)(this,"_isTaskSessionQueryParam",(e,t)=>t.startsWith(rE)),(0,s.A)(this,"getAllTaskSessions",()=>{try{return JSON.parse(this._safeSessionStorage.getItem(rO)||"")}catch(e){return{}}}),(0,s.A)(this,"_writeToSessionStorage",e=>{try{this._safeSessionStorage.setItem(rO,JSON.stringify(e))}catch(e){}}),(0,s.A)(this,"_appendTaskSessions",e=>{let t=this.getAllTaskSessions(),r=null===t?e:Object.assign(t,e);this._writeToSessionStorage(r)}),(0,s.A)(this,"_safelyRemoveKey",(e,t)=>null===e?{}:(delete e[t],e)),(0,s.A)(this,"createTaskSession",e=>{let t=i()(),r={};return r[e]=t,this._appendTaskSessions(r),t}),(0,s.A)(this,"createTaskSessionWithProvidedId",(e,t)=>{if("string"!=typeof t)throw TypeError("invalid taskSessionId, must be string");let r={};r[e]=t,this._appendTaskSessions(r)}),(0,s.A)(this,"completeTaskSession",e=>{let t=this.getAllTaskSessions(),r=this._safelyRemoveKey(t,e);this._writeToSessionStorage(r)}),(0,s.A)(this,"formatTaskSessionQueryString",({uri:e,includedTaskSessions:t})=>{let{url:r,query:s}=(0,rc.parseUrl)(e),n=this.getAllTaskSessions(),i=t?M(n,t):V(n,Object.values(o.D0));if(0===Object.keys(i).length)return e;let a=rC(rC({},U(i,(e,t)=>rE+t)),s);return`${r}?${(0,rc.stringify)(a)}`}),(0,s.A)(this,"stripQueryParameters",()=>{let e=U(rd(this._isTaskSessionQueryParam),this._removeTaskSessionPrefix);this._appendTaskSessions(e)});let e=Date.now();this._safeSessionStorage=new rv;try{this._taskSessionsNotRecentlyInitialised(e)&&(this._writeToSessionStorage({}),this._safeSessionStorage.setItem(rk,e.toString()))}catch(e){}}}let rA=tS.AWC_ANALYTICS_DEBUG.getKey(),rI="synthetic",rj=()=>{try{return JSON.parse(tC().get(rA)||"false")}catch(e){tC().remove(rA)}return!1},rx=class{constructor(){(0,s.A)(this,"_bind",()=>{"undefined"==typeof window||window.testAnalytics||(window.testAnalytics={eventCache:[],events:()=>window.testAnalytics.eventCache,clear:()=>{window.testAnalytics.eventCache=[];try{localStorage.removeItem("awc.ui.viewed.last.sent"),localStorage.removeItem("awc-staging.ui.viewed.last.sent"),localStorage.removeItem("awc-dev.ui.viewed.last.sent"),localStorage.removeItem("awc-local.ui.viewed.last.sent")}catch(e){}}})}),(0,s.A)(this,"_cache",e=>{"undefined"!=typeof window&&(window.testAnalytics.eventCache.length>=100&&(window.testAnalytics.eventCache=window.testAnalytics.eventCache.slice(1,window.testAnalytics.eventCache.length)),window.testAnalytics.eventCache.push(e))}),(0,s.A)(this,"_shouldCacheEvent",()=>this._isDebugCookieEnabled),(0,s.A)(this,"saveEvent",e=>{e&&this._shouldCacheEvent()&&(window.testAnalytics||this._bind(),e.tags instanceof Array?e.tags.push(rI):e.tags=[rI],this._cache(e))}),this._isDebugCookieEnabled=rj(),this._isDebugCookieEnabled&&this._bind()}},rT=["embeddedProduct"];function rP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function rD(e){for(var t=1;t{this._startInterval(),this._bindEventListeners()}),(0,s.A)(this,"stop",()=>{this._stopInterval(),this._unbindEventListeners()}),(0,s.A)(this,"resetTimers",()=>{this._intervalId&&(this.stop(),this.start())}),(0,s.A)(this,"_bindEventListeners",()=>{"undefined"!=typeof window&&(window.addEventListener("focus",this._focusListener),window.addEventListener("blur",this._blurListener))}),(0,s.A)(this,"_unbindEventListeners",()=>{"undefined"!=typeof window&&(window.removeEventListener("focus",this._focusListener),window.removeEventListener("blur",this._blurListener))}),(0,s.A)(this,"_startInterval",()=>{clearInterval(this._intervalId),this._intervalId=setInterval(this._handleInterval,this._delay)}),(0,s.A)(this,"_stopInterval",()=>{this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)}),(0,s.A)(this,"_getProductKey",(e,t)=>{let r=e;return t&&(r+=`-${t}`),r}),(0,s.A)(this,"_getLastSentTimestamp",(e,t,r)=>(((this._parseLocalStorageData(this._storageKey)||{})[r]||{})[t]||{})[e]||null),(0,s.A)(this,"_parseLocalStorageData",e=>{let t=this._safeLocalStorage.getItem(e);try{return JSON.parse(t||"")}catch(t){return this._safeLocalStorage.removeItem(e),null}}),(0,s.A)(this,"_getMalformedLastSentTimestamp",(e,t,r)=>(((this._parseLocalStorageData(this._malformedEventStorageKey)||{})[r||"NOT_SET"]||{})[t||"NOT_SET"]||{})[e]||null),(0,s.A)(this,"_setLastSentTimestamp",(e,t,r)=>{let s=this._parseLocalStorageData(this._storageKey)||{},n=s[r]||{},i=n[t]||{};i[e]=Date.now(),n[t]=i,s[r]=n,this._safeLocalStorage.setItem(this._storageKey,JSON.stringify(s))}),(0,s.A)(this,"_setMalformedLastSentTimestamp",(e,t,r)=>{let s=this._parseLocalStorageData(this._malformedEventStorageKey)||{},n=r||"NOT_SET",i=t||"NOT_SET",o=s[n]||{},a=o[i]||{};a[e]=Date.now(),o[i]=a,s[n]=o,this._safeLocalStorage.setItem(this._malformedEventStorageKey,JSON.stringify(s))}),(0,s.A)(this,"_shouldSendEvent",(e,t,r,s)=>{if(!document.hasFocus())return"FocusLost";if(t!==o.v7.NONE&&!r||!s){let t=Date.now()-this._getMalformedLastSentTimestamp(e,r,s);return null===t||t>this._throttle?"UserOrTenantIncomplete":"MalformedUiViewedRateLimited"}let n=Date.now()-this._getLastSentTimestamp(e,r,s);return null===n||n>this._throttle?"EligibleToSend":"UiViewedRateLimited"}),(0,s.A)(this,"_handleInterval",()=>{let e=this._getContext(),{embeddedProduct:t}=e,r=(0,ej.A)(e,rT);this._sendEvent(this._product,r),t&&this._sendEvent(t,r,!0)}),(0,s.A)(this,"_sendEvent",(e,t,r=!1)=>{let{subproduct:s,tenantIdType:n,tenantId:i,userId:o,lastScreenEvent:a,attributes:l}=t,c=this._getProductKey(e,s);switch(this._shouldSendEvent(c,n,i,o)){case"EligibleToSend":this._setLastSentTimestamp(c,i,o),this._onEvent(this._createEvent(e,s,r,a,l,"ui","viewed"));break;case"UserOrTenantIncomplete":this._setMalformedLastSentTimestamp(c,i,o),this._onEvent(this._createEvent(e,s,r,a,l,"malformed","uiviewed"))}}),(0,s.A)(this,"_createEvent",(e,t,r,s,n,i,o)=>{let a={product:e,source:"ui",action:o,actionSubject:i,attributes:n};return r&&(a.subproduct=null,a.version=null,a.attributes=rD(rD({},a.attributes),{},{embeddedInEnv:this._productInfo.env,embeddedInProduct:this._productInfo.product,embeddedInSubproduct:t,embeddedInVersion:this._productInfo.version,embeddedInOrigin:this._productInfo.origin,embeddedInPlatform:this._productInfo.platform})),s&&(a.attributes=rD(rD({},a.attributes),{},{lastScreenEvent:{name:s.name,attributes:s.attributes}})),a}),!e)throw Error("Missing productInfo");if(!e.product)throw Error("Missing productInfo.product");if(!t)throw Error("Missing getContext callback");if("function"!=typeof t)throw Error("Invalid getContext, must be function");if(!r)throw Error("Missing onEvent callback");if("function"!=typeof r)throw Error("Invalid onEvent, must be function");this._productInfo=e,this._product=e.product,this._getContext=t,this._onEvent=r,this._delay=n.delay||2e3,this._throttle=n.throttle||36e5,this._storageKey=n.storageKey||"ui.viewed.last.sent",this._malformedEventStorageKey=n.malformedStorageKey||"malformed.uiviewed.last.sent",this._safeLocalStorage=new tT({envPrefix:this._productInfo.env}),this._focusListener=()=>{this._startInterval()},this._blurListener=()=>{this._stopInterval()}}}function rL(e,t){return e&&"function"==typeof e?()=>{e(t)}:null}let rN=function(e){return e.XC="xc",e.UID="uid",e}({}),rU=()=>[{type:rN.XC,state:"TIMEOUT"},{type:rN.UID,state:"TIMEOUT"}],rM=()=>[{type:rN.XC,state:"UNKNOWN"},{type:rN.UID,state:"UNKNOWN"}],rF=(e,t)=>{if(e&&t&&"function"==typeof t)return Promise.race([t().catch(()=>()=>rM()),new Promise(e=>{setTimeout(()=>e(()=>rU()),5e3)})])};function rB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function rV(e){for(var t=1;t{rG.callback(t,e)}}static callback(e,t){let r=e.getStatusCode();r>=200&&r<=299?e.getEventResponseList().forEach(e=>{t.warn("Validation report for event with message ID %s:\n",e.getMessageId(),e)}):400===r||404===r?(t.warn("GASv3 submission failed with HTTP Status Code %d: %s",e.getStatusCode(),e.getMessage()),e.getEventResponseList().forEach(e=>{t.warn("Event with message ID %s:\n",e.getMessageId(),e)})):(t.log("GASv3 submission failed with HTTP Status Code %d: %s",e.getStatusCode(),e.getMessage()),e.eventResponseList.forEach(e=>{t.debug("Event with message ID %s:\n",e.getMessageId(),e)}))}}class r${constructor(e,t={}){if((0,s.A)(this,"_useStargate",e=>null==e||e),(0,s.A)(this,"_changeInternalUserId",(e,t)=>{this._eventProcessor.getUser().setUserId(e),t&&t!==this._eventProcessor.getUser().getAnonymousId()&&this._eventProcessor.getUser().setAnonymousId(t)}),(0,s.A)(this,"_createSubproductGetter",e=>p(e,"Cannot get subproduct from the callback. Proceeding without it.")),(0,s.A)(this,"_createEmbeddedProductGetter",e=>p(e,"Cannot get embeddedProduct from the callback. Proceeding without it.")),(0,s.A)(this,"_getLastScreenEvent",()=>{try{return JSON.parse(this._safeSessionStorage.getItem(rK)||"")}catch(e){return this._safeSessionStorage.removeItem(rK),null}}),(0,s.A)(this,"_setLastScreenEvent",e=>{this._safeSessionStorage.setItem(rK,JSON.stringify({name:e.name,attributes:e.attributes}))}),(0,s.A)(this,"_shouldEventBeDelayed",e=>{if(!e.tags||-1===e.tags.indexOf("measurement"))return!1;let t=!1!==e.highPriority;return this._eventDelayQueue.isDelayingLowPriorityEvents()&&!t}),(0,s.A)(this,"_fireEvent",(e,t,r,s)=>{switch(t.eventType){case o.$q.UI:case o.$q.OPERATIONAL:case o.$q.TRACK:return this._eventProcessor.track(e,t,r,s);case o.$q.SCREEN:return this._eventProcessor.page(e,t,r,s);case o.$q.IDENTIFY:return this._eventProcessor.identify(e,t,r,s);default:throw Error(`No handler has been defined for events of type ${t.eventType}`)}}),(0,s.A)(this,"_fireDelayedEvent",(e,t,r,s)=>{try{this._changeInternalUserId(s.userId,s.anonymousId),t.tags=[...t.tags||[],"sentWithDelay"],this._fireEvent(e,t,r,void 0)}finally{this._changeInternalUserId(this._userInfo.userId,this._userInfo.anonymousId)}}),(0,s.A)(this,"_delayEvent",(e,t,r,s,n)=>{this._eventDelayQueue.push(e,t,r,s),n&&n()}),(0,s.A)(this,"_processEvent",(e,t,r,s)=>(this._testingCache.saveEvent(t),this._shouldEventBeDelayed(t))?(this._delayEvent(e,t,r,this._userInfo,s),Promise.resolve()):this._fireEvent(e,t,r,s)),(0,s.A)(this,"setEmbeddedProduct",e=>{this._internalProductInfo.embeddedProduct=this._createEmbeddedProductGetter(e),this.resetUIViewedTimers()}),(0,s.A)(this,"clearEmbeddedProduct",()=>{this._internalProductInfo.embeddedProduct=this._createEmbeddedProductGetter(null)}),(0,s.A)(this,"setSubproduct",e=>{this._internalProductInfo.subproduct=this._createSubproductGetter(e),this.resetUIViewedTimers()}),(0,s.A)(this,"setOriginTracingHandlers",e=>{let t=this._originTracing.handleOriginParameters(e,this._historyReplaceFn);Object.keys(t).forEach(e=>{void 0!==t[e].taskSessionId&&this._task.createTaskSessionWithProvidedId(e,t[e].taskSessionId)});let r={};return(Object.keys(t).forEach(e=>{t[e].originTracingAttributes?r[e]=t[e].originTracingAttributes:console.warn(`Handling method for origin parameter ${e} has not returned any attributes`)}),Object.keys(t).length>0)?this.sendOperationalEvent({action:"landed",actionSubject:"origin",source:"webClient",attributes:{originTracesLanded:r}},()=>{}):Promise.resolve()}),(0,s.A)(this,"setTenantInfo",(e,t)=>{if(!e)throw Error("Missing tenantIdType");if(e!==o.v7.NONE&&!t)throw Error("Missing tenantId");if(!(0,o.Xj)(o.v7,e))throw Error(`Invalid tenantIdType '${e}', must be an tenantType: [${(0,o.KQ)(o.v7)}]`);this._tenantInfo={tenantIdType:e,tenantId:t},this._eventProcessor.refreshMetadata(this._userInfo,this._tenantInfo)}),(0,s.A)(this,"clearTenantInfo",()=>{this._tenantInfo={},this._eventProcessor.refreshMetadata(this._userInfo,this._tenantInfo)}),(0,s.A)(this,"setOrgInfo",e=>{if(!e)throw Error("Missing orgId");this._orgInfo={orgId:e}}),(0,s.A)(this,"clearOrgInfo",()=>{this._orgInfo={}}),(0,s.A)(this,"setWorkspaceInfo",e=>{if(!e)throw Error("Missing workspaceId");this._workspaceInfo={workspaceId:e}}),(0,s.A)(this,"clearWorkspaceInfo",()=>{this._workspaceInfo={}}),(0,s.A)(this,"setUserInfo",(e,t)=>{(function(e,t){if(!e)throw Error("Missing userIdType");if(!t)throw Error("Missing userId");if(!(0,o.Xj)(o.Of,e))throw Error(`Invalid userIdType '${e}', must be an userType: [${(0,o.KQ)(o.Of)}]`)})(e,t),this._changeInternalUserId(t),this._userInfo={userIdType:e,userId:t,anonymousId:this._eventProcessor.getUser().getAnonymousId()},this._eventProcessor.refreshMetadata(this._userInfo,this._tenantInfo)}),(0,s.A)(this,"clearUserInfo",()=>{this._changeInternalUserId(void 0),this._userInfo={anonymousId:this._eventProcessor.getUser().getAnonymousId()},this._eventProcessor.refreshMetadata(this._userInfo,this._tenantInfo)}),(0,s.A)(this,"setAlias",(e,t)=>{if(!e)throw Error("Missing aliasType");if(!(0,o.Xj)(o.VD,e))throw Error(`Invalid aliasType '${e}', must be an aliasType: [${(0,o.KQ)(o.VD)}]`);this._aliases[e]=t}),(0,s.A)(this,"clearAlias",()=>{this._aliases={}}),(0,s.A)(this,"setGroup",(e,t)=>{if(!e)throw Error("Missing groupType");if(!(0,o.Xj)(o.iU,e))throw Error(`Invalid groupType '${e}', must be an groupType: [${(0,o.KQ)(o.iU)}]`);this._groups[e]=t}),(0,s.A)(this,"clearGroup",()=>{this._groups={}}),(0,s.A)(this,"getAnonymousId",()=>this._userInfo.anonymousId),(0,s.A)(this,"setUIViewedAttributes",e=>{if(!e)throw Error("Missing uiViewedAttributes");if("object"!=typeof e||Array.isArray(e))throw Error("Invalid uiViewedAttributes type, should be a non array object");this._uiViewedAttributes=rV({},e)}),(0,s.A)(this,"getUIViewedAttributes",()=>this._uiViewedAttributes),(0,s.A)(this,"clearUIViewedAttributes",()=>{this._uiViewedAttributes={}}),(0,s.A)(this,"sendIdentifyEvent",(e,t,r)=>{this.setUserInfo(e,t);let s={userIdType:e,eventType:o.$q.IDENTIFY};return this._processEvent(t,s,this._context,r)}),(0,s.A)(this,"sendPageEvent",(e,t)=>this.sendScreenEvent(e,t)),(0,s.A)(this,"sendScreenEvent",(e,t,r)=>{let s,n,i,a;"object"==typeof e?(s=e.name,n=e.attributes,i=e.containers,a=e.tags):(s=e,n=r),function(e){if(!e)throw Error("Missing name")}(s),z(i);let l=rV({name:s},function(e,t,r,s,n,i,a,l,c,u,d,h,p,m,f,g){let y=I(e),v=_(t),A=w(r),j=C(u),P=O(h),D={title:"",path:"",url:"",referrer:"",search:"",eventType:o.$q.SCREEN};return b(b(b(b(b(b(b(b(b(b(b(b({},y),v),A),j),D),x("attributes",s)),x("nonPrivacySafeAttributes",n)),T(m)),S(p)),{},{tags:i,tabId:a,sessionId:l,taskSessions:c,pageLoadId:d},P),k(f)),E(g))}(this._internalProductInfo,this._tenantInfo,this._userInfo,n,e.nonPrivacySafeAttributes,a,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this._task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,e,i,this._aliases,this._groups));return this._setLastScreenEvent(l),this._processEvent(s,l,this._context,rL(t,l))}),(0,s.A)(this,"sendTrackEvent",(e,t)=>{q(e);let r=L(this._internalProductInfo,this._tenantInfo,this._userInfo,e,o.$q.TRACK,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this._task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,this._aliases,this._groups);return this._processEvent(D(e),r,this._context,rL(t,r))}),(0,s.A)(this,"sendUIEvent",(e,t)=>{q(e);let r=L(this._internalProductInfo,this._tenantInfo,this._userInfo,e,o.$q.UI,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this._task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,this._aliases,this._groups);return this._processEvent(D(e),r,this._context,rL(t,r))}),(0,s.A)(this,"sendOperationalEvent",(e,t)=>{q(e);let r=L(this._internalProductInfo,this._tenantInfo,this._userInfo,e,o.$q.OPERATIONAL,this._tabTracking.getCurrentTabId(),this._sessionTracking.getCurrentSessionId(),this._task.getAllTaskSessions(),this._orgInfo,this._pageLoadId,this._workspaceInfo,this._aliases,this._groups);return this._processEvent(D(e),r,this._context,rL(t,r))}),(0,s.A)(this,"startUIViewedEvent",e=>{this.stopUIViewedEvent(),this._uiViewedEvent=new rR(this._internalProductInfo,()=>({embeddedProduct:this._internalProductInfo.embeddedProduct(),subproduct:this._internalProductInfo.subproduct(),tenantIdType:this._tenantInfo.tenantIdType,tenantId:this._tenantInfo.tenantId,userId:this._userInfo.userId,lastScreenEvent:this._getLastScreenEvent(),attributes:this._uiViewedAttributes}),t=>this.sendUIEvent(t,e)),this._uiViewedEvent.start()}),(0,s.A)(this,"stopUIViewedEvent",()=>{this._uiViewedEvent&&(this._uiViewedEvent.stop(),this._uiViewedEvent=null)}),(0,s.A)(this,"resetUIViewedTimers",()=>{this._uiViewedEvent&&this._uiViewedEvent.resetTimers()}),(0,s.A)(this,"startApdexEvent",e=>{this._apdexEvent.start(e)}),(0,s.A)(this,"getApdexStart",e=>this._apdexEvent.getStart(e)),(0,s.A)(this,"stopApdexEvent",(e,t)=>{this._apdexEvent.stop(e,t)}),(0,s.A)(this,"startLowPriorityEventDelay",(e,t)=>{this._eventDelayQueue.startLowPriorityEventDelay(e,t)}),(0,s.A)(this,"stopLowPriorityEventDelay",()=>{this._eventDelayQueue.stopLowPriorityEventDelay()}),(0,s.A)(this,"onEvent",(e,t)=>{if(!t)throw Error("Missing analyticsData");if(!t.eventType)throw Error("Missing analyticsData.eventType");if(t.eventType===o.$q.TRACK)return this.sendTrackEvent(t);if(t.eventType===o.$q.UI)return this.sendUIEvent(t);if(t.eventType===o.$q.OPERATIONAL)return this.sendOperationalEvent(t);if(t.eventType===o.$q.SCREEN)return this.sendScreenEvent(t.name,null,t.attributes);if(t.eventType===o.$q.IDENTIFY)return this.sendIdentifyEvent(t.userIdType,t.userId);throw Error(`Invalid analyticsData.eventType '${t.eventType}', must be an eventType: [${(0,o.KQ)(o.$q)}]`)}),(0,s.A)(this,"setResponseCallback",e=>{this._eventProcessor.setResponseCallback(e)}),!e)throw Error("Missing productInfo");if(!e.env)throw Error("Missing productInfo.env");if(!e.product)throw Error("Missing productInfo.product");if(!(0,o.Xj)(o.sR,e.env))throw Error(`Invalid productInfo.env '${e.env}', must be an envType: [${(0,o.KQ)(o.sR)}]`);if(e.perimeter&&!(0,o.Xj)(o.KW,e.perimeter))throw Error(`Invalid productInfo.perimeter '${e.perimeter}', must be an perimeterType: [${(0,o.KQ)(o.KW)}]`);if(e.origin){if(!(0,o.Xj)(o.VH,e.origin))throw Error(`Invalid productInfo.origin '${e.origin}', must be an originType: [${(0,o.KQ)(o.VH)}]`)}else e.origin=o.VH.WEB;e.platform?function(e){if(!(0,o.Xj)(o.AQ,e.platform))throw Error(`Invalid productInfo.platform '${e.platform}', must be a platformType: [${(0,o.KQ)(o.AQ)}]`);if(e.origin===o.VH.DESKTOP&&!(0,o.Xj)(o.vB,e.platform))throw Error(`Invalid productInfo.platform '${e.platform}', must be one of [mac, linux, windows]`);if(e.origin===o.VH.WEB&&!(0,o.Xj)(o.LK,e.platform))throw Error(`Invalid productInfo.platform '${e.platform}', must be one of [web, mobileWeb]`)}(e):e.platform=e.origin===o.VH.WEB?o.AQ.WEB:o.AQ.DESKTOP,this._logger=t.logger||console,this._internalProductInfo=rV(rV({},e),{},{subproduct:this._createSubproductGetter(e.subproduct),embeddedProduct:this._createEmbeddedProductGetter(e.embeddedProduct)}),this._tenantInfo={},this._orgInfo={},this._uiViewedAttributes={},null!=e&&e.embeddedContext&&(this._embeddedContext=e.embeddedContext,m(this._embeddedContext)&&this.setUIViewedAttributes({embeddedType:this._embeddedContext.embeddedType,embeddedFromProduct:this._embeddedContext.embeddedFromProduct,embeddedFromSubproduct:this._embeddedContext.embeddedFromSubproduct,embeddedFromTopLevelDomain:this._embeddedContext.embeddedFromTopLevelDomain}),f(this._embeddedContext)&&this.setUIViewedAttributes({embeddedType:this._embeddedContext.embeddedType,embeddedFromTopLevelDomain:this._embeddedContext.embeddedFromTopLevelDomain})),this._context=function(e){let t=window.screen||{};return{context:{locale:e.locale,screen:{width:t.width,height:t.height,density:window.devicePixelRatio},library:{name:"analytics.js",version:"5.4.1"},validationMode:function(e){let t=e.env;return void 0===t||t.includes("prod")?R.QUIET:R.COMPLETE}(e)}}}(this._internalProductInfo),this._safeSessionStorage=new rv;let r=this._useStargate(t.useStargate),n=t.apiHost||function({useStargate:e,env:t,useLegacyUrl:r,perimeter:s,envOverride:n}){return s===o.KW.FEDRAMP_MODERATE?t9({useStargate:e,env:t,useLegacyUrl:r,envOverride:n}):re({useStargate:e,env:t,useLegacyUrl:r})}({useStargate:r,env:e.env,useLegacyUrl:t.useLegacyUrl,perimeter:e.perimeter,envOverride:e.envOverride}),l=t.apiHostProtocol||"https",c=t.minRetryDelay||1e3,u=void 0!==t.maxRetryAttempts&&Number.isInteger(t.maxRetryAttempts)&&t.maxRetryAttempts>=0?t.maxRetryAttempts+1:void 0,h={maxRetryDelay:6e4,minRetryDelay:c,backoffFactor:2,flushWaitMs:t.flushWaitInterval,flushBeforeUnload:t.flushBeforeUnload,maxAttempts:u},g=`awc-${e.env}`,y=t.disableCookiePersistence||!1,v=(t.metadataClientFactory||rl.Factory)(l,n,e.product);this._eventProcessor=new t5({apiHost:n,apiHostProtocol:l,product:e.product,retryQueuePrefix:g,retryQueueOptions:h,xidPromiseGetter:()=>rF(t.xidConsent,t.xidPromiseFn),logger:this._logger,metadataClient:v,disableCookiePersistence:y,responseCallback:rG.getCallback(this._logger),env:e.env,perimeter:e.perimeter,enableMetadataCalls:this.metadataCallsEnabled(t),enableEventCalls:this.eventCallsEnabled(t)}),this._userInfo={anonymousId:this._eventProcessor.getUser().getAnonymousId(null==t?void 0:t.customAnonymousIdGenerator)},this._pageVisibility=new a,this._tabTracking=new r_,this._sessionTracking=new ry({sessionExpiryTime:t.sessionExpiryTime,onNewSessionStarted:t.onNewSessionStarted}),this._task=new rS,this._originTracing=new rh,this._apdexEvent=new d(this.sendOperationalEvent,this._pageVisibility),this._historyReplaceFn="function"==typeof t.historyReplaceFn?t.historyReplaceFn:ru,this._eventDelayQueue=new ee(this._fireDelayedEvent,t.delayQueueCompressors||[]),this._testingCache=new rx,this._pageLoadId=i()(),this._workspaceInfo={},this._aliases={},this._groups={}}metadataCallsEnabled(e){return"boolean"==typeof e.disableMetadataCalls?!e.disableMetadataCalls:!rt.isGeminiVREnvironment()&&!rt.areFetchCallsDisabled()}eventCallsEnabled(e){return"boolean"==typeof e.disableEventCalls?!e.disableEventCalls:!rt.isGeminiVREnvironment()&&!rt.areFetchCallsDisabled()}setEventValidationMode(e){this._context.context.validationMode=e}get task(){return this._task}get _productInfo(){return this._internalProductInfo}}},"./node_modules/@atlassiansox/analytics-web-client/dist/esm/analyticsWebTypes.js":(e,t,r)=>{"use strict";r.d(t,{$q:()=>n,AQ:()=>i,D0:()=>p,KQ:()=>m,KW:()=>g,LK:()=>h,LR:()=>u,Of:()=>c,VD:()=>y,VH:()=>o,Xj:()=>f,iU:()=>v,sR:()=>s,v7:()=>a,vB:()=>d,vH:()=>l});let s=function(e){return e.LOCAL="local",e.DEV="dev",e.STAGING="staging",e.PROD="prod",e}({}),n=function(e){return e.TRACK="track",e.UI="ui",e.OPERATIONAL="operational",e.SCREEN="screen",e.IDENTIFY="identify",e}({}),i=function(e){return e.MAC="mac",e.LINUX="linux",e.WINDOWS="windows",e.DESKTOP="desktop",e.WEB="web",e.MOBILE_WEB="mobileWeb",e}({}),o=function(e){return e.DESKTOP="desktop",e.WEB="web",e}({}),a=function(e){return e.CLOUD_ID="cloudId",e.ORG_ID="orgId",e.OPSGENIE_CUSTOMER_ID="opsgenieCustomerId",e.HALP_TEAM_ID="halpTeamId",e.LOOM_ORG_ID="loomOrgId",e.TRANSACTION_ACCOUNT_ID="transactionAccountId",e.TRELLO_WORKSPACE_ID="trelloWorkspaceId",e.JA_WORKSPACE_ID="jiraAlignWorkspaceId",e.NONE="none",e}({}),l=function(e){return e.FIRST_PARTY="FIRST_PARTY",e.THIRD_PARTY="THIRD_PARTY",e}({}),c=function(e){return e.ATLASSIAN_ACCOUNT="atlassianAccount",e.HASHED_EMAIL="hashedEmail",e.LOOM="loom",e.TRELLO="trello",e.OPSGENIE="opsgenie",e.JA_USER_ID="jiraAlign",e.HALP="halp",e}({}),u=function(e){return e.TRANSITION="transition",e.INITIAL_LOAD="initialLoad",e}({}),d=Object.freeze([i.DESKTOP,i.MAC,i.LINUX,i.WINDOWS]),h=Object.freeze([i.WEB,i.MOBILE_WEB]),p=function(e){return e.ATL_ORIGIN="atlOrigin",e}({});function m(e){return Object.values(e)}function f(e,t){return Object.values(e).indexOf(t)>-1}let g=function(e){return e.C5="c5",e.COMMERCIAL="commercial",e.FEDRAMP_MODERATE="fedramp-moderate",e.FEDRAMP_HIGH="fedramp-high",e}({}),y={},v=function(e){return e.TRANSACTION_ACCOUNT_ID="transactionAccountId",e}({})},"./node_modules/@atlassiansox/analytics-web-client/node_modules/uuid/lib/bytesToUuid.js":e=>{for(var t=[],r=0;r<256;++r)t[r]=(r+256).toString(16).substr(1);e.exports=function(e,r){var s=r||0;return[t[e[s++]],t[e[s++]],t[e[s++]],t[e[s++]],"-",t[e[s++]],t[e[s++]],"-",t[e[s++]],t[e[s++]],"-",t[e[s++]],t[e[s++]],"-",t[e[s++]],t[e[s++]],t[e[s++]],t[e[s++]],t[e[s++]],t[e[s++]]].join("")}},"./node_modules/@atlassiansox/analytics-web-client/node_modules/uuid/lib/rng-browser.js":e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var s=Array(16);e.exports=function(){for(var e,t=0;t<16;t++)(3&t)==0&&(e=4294967296*Math.random()),s[t]=e>>>((3&t)<<3)&255;return s}}},"./node_modules/@atlassiansox/analytics-web-client/node_modules/uuid/v4.js":(e,t,r)=>{var s=r("./node_modules/@atlassiansox/analytics-web-client/node_modules/uuid/lib/rng-browser.js"),n=r("./node_modules/@atlassiansox/analytics-web-client/node_modules/uuid/lib/bytesToUuid.js");e.exports=function(e,t,r){var i=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;++a)t[i+a]=o[a];return t||n(o)}},"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":(e,t,r)=>{"use strict";function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=Array(t);rs})},"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":(e,t,r)=>{"use strict";function s(e){if(Array.isArray(e))return e}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":(e,t,r)=>{"use strict";function s(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":(e,t,r)=>{"use strict";function s(e,t,r,s,n,i,o){try{var a=e[i](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(s,n)}function n(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){s(o,n,i,a,l,"next",e)}function l(e){s(o,n,i,a,l,"throw",e)}a(void 0)})}}r.d(t,{A:()=>n})},"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":(e,t,r)=>{"use strict";function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/construct.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r("./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js"),n=r("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function i(e,t,r){if((0,s.A)())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var o=new(e.bind.apply(e,i));return r&&(0,n.A)(o,r.prototype),o}},"./node_modules/@babel/runtime/helpers/esm/createClass.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r("./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");function n(e,t){for(var r=0;r{"use strict";r.d(t,{A:()=>n});var s=r("./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");function n(e,t,r){return(t=(0,s.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},"./node_modules/@babel/runtime/helpers/esm/get.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");function n(){return(n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=(0,s.A)(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}}).apply(null,arguments)}},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":(e,t,r)=>{"use strict";function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/inherits.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");function n(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,s.A)(e,t)}},"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":(e,t,r)=>{"use strict";function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js":(e,t,r)=>{"use strict";function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":(e,t,r)=>{"use strict";function s(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r("./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js");function n(e,t){if(null==e)return{};var r,n,i=(0,s.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n{"use strict";function s(e,t){if(null==e)return{};var r={};for(var s in e)if(({}).hasOwnProperty.call(e,s)){if(-1!==t.indexOf(s))continue;r[s]=e[s]}return r}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),n=r("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function i(e,t){if(t&&("object"==(0,s.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return(0,n.A)(e)}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":(e,t,r)=>{"use strict";function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var s=r("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"),n=r("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),i=r("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function o(e,t){return(0,s.A)(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var s,n,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=i.call(r)).done)&&(a.push(s.value),a.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw n}}return a}}(e,t)||(0,n.A)(e,t)||(0,i.A)()}},"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var s=r("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"),n=r("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),i=r("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");function o(e){return function(e){if(Array.isArray(e))return(0,s.A)(e)}(e)||(0,n.A)(e)||(0,i.A)(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},"./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r("./node_modules/@babel/runtime/helpers/esm/typeof.js");function n(e){var t=function(e,t){if("object"!=(0,s.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=(0,s.A)(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,s.A)(t)?t:t+""}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":(e,t,r)=>{"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>s})},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function n(e,t){if(e){if("string"==typeof e)return(0,s.A)(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?(0,s.A)(e,t):void 0}}},"./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var s=r("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),n=r("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"),i=r("./node_modules/@babel/runtime/helpers/esm/construct.js");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,i.A)(e,arguments,(0,s.A)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,n.A)(r,e)})(e)}},"./node_modules/@babel/runtime/helpers/regeneratorRuntime.js":(e,t,r)=>{var s=r("./node_modules/@babel/runtime/helpers/typeof.js").default;function n(){"use strict";e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,r){return e[t]=r}}function p(e,r,s,n){var i,o,l=Object.create((r&&r.prototype instanceof b?r:b).prototype);return a(l,"_invoke",{value:(i=new x(n||[]),o=f,function(r,n){if(o===g)throw Error("Generator is already running");if(o===y){if("throw"===r)throw n;return{value:t,done:!0}}for(i.method=r,i.arg=n;;){var a=i.delegate;if(a){var l=function e(r,s){var n=s.method,i=r.iterator[n];if(i===t)return s.delegate=null,"throw"===n&&r.iterator.return&&(s.method="return",s.arg=t,e(r,s),"throw"===s.method)||"return"!==n&&(s.method="throw",s.arg=TypeError("The iterator does not provide a '"+n+"' method")),v;var o=m(i,r.iterator,s.arg);if("throw"===o.type)return s.method="throw",s.arg=o.arg,s.delegate=null,v;var a=o.arg;return a?a.done?(s[r.resultName]=a.value,s.next=r.nextLoc,"return"!==s.method&&(s.method="next",s.arg=t),s.delegate=null,v):a:(s.method="throw",s.arg=TypeError("iterator result is not an object"),s.delegate=null,v)}(a,i);if(l){if(l===v)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===f)throw o=y,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=g;var c=m(e,s,i);if("normal"===c.type){if(o=i.done?y:"suspendedYield",c.arg===v)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(o=y,i.method="throw",i.arg=c.arg)}})}),l}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=p;var f="suspendedStart",g="executing",y="completed",v={};function b(){}function _(){}function w(){}var C={};h(C,c,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(T([])));k&&k!==i&&o.call(k,c)&&(C=k);var E=w.prototype=b.prototype=Object.create(C);function S(e){["next","throw","return"].forEach(function(t){h(e,t,function(e){return this._invoke(t,e)})})}function A(e,t){var r;a(this,"_invoke",{value:function(n,i){function a(){return new t(function(r,a){!function r(n,i,a,l){var c=m(e[n],e,i);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==s(d)&&o.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,a,l)},function(e){r("throw",e,a,l)}):t.resolve(d).then(function(e){u.value=e,a(u)},function(e){return r("throw",e,a,l)})}l(c.arg)}(n,i,r,a)})}return r=r?r.then(a,a):a()}})}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return s("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var s=this.tryEntries[r];if(s.tryLoc<=this.prev&&o.call(s,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),j(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var s=r.completion;if("throw"===s.type){var n=s.arg;j(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,s){return this.delegate={iterator:T(e),resultName:r,nextLoc:s},"next"===this.method&&(this.arg=t),v}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/regenerator/index.js":(e,t,r)=>{var s=r("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();e.exports=s;try{regeneratorRuntime=s}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}},"./node_modules/@segment/isodate-traverse/lib/index.js":(e,t,r)=>{"use strict";var s=r("./node_modules/@segment/isodate/lib/index.js");e.exports=function e(t,r){var n,i;return(void 0===r&&(r=!0),t&&"object"==typeof t)?(n=r,Object.keys(t).forEach(function(r){t[r]=e(t[r],n)}),t):Array.isArray(t)?(i=r,t.forEach(function(r,s){t[s]=e(r,i)}),t):s.is(t,r)?s.parse(t):t}},"./node_modules/@segment/isodate/lib/index.js":(e,t)=>{"use strict";var r=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;t.parse=function(e){var t=[1,5,6,7,11,12],s=r.exec(e),n=0;if(!s)return new Date(e);for(var i,o=0;i=t[o];o++)s[i]=parseInt(s[i],10)||0;return s[2]=parseInt(s[2],10)||1,s[3]=parseInt(s[3],10)||1,s[2]--,s[8]=s[8]?(s[8]+"00").substring(0,3):0," "===s[4]?n=new Date().getTimezoneOffset():"Z"!==s[9]&&s[10]&&(n=60*s[11]+s[12],"+"===s[10]&&(n=0-n)),new Date(Date.UTC(s[1],s[2],s[3],s[5],s[6]+n,s[7],s[8]))},t.is=function(e,t){return"string"==typeof e&&(!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&r.test(e)}},"./node_modules/@statsig/client-core/src/$_StatsigGlobal.js":(e,t,r)=>{"use strict";var s,n,i;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;let o=r("./node_modules/@statsig/client-core/src/Log.js");t._getStatsigGlobal=()=>__STATSIG__||d,t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e],t._getInstance=e=>{let r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&o.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),r.firstInstance)};let a="__STATSIG__",l="undefined"!=typeof window?window:{},c=void 0!==r.g?r.g:{},u="undefined"!=typeof globalThis?globalThis:{},d=null!==(i=null!==(n=null!==(s=l[a])&&void 0!==s?s:c[a])&&void 0!==n?n:u[a])&&void 0!==i?i:{instance:t._getInstance};l[a]=d,c[a]=d,u[a]=d},"./node_modules/@statsig/client-core/src/CacheKey.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;let s=r("./node_modules/@statsig/client-core/src/Hashing.js");function n(e,t,r){var n;if(r)return r(e,t);let i=t&&t.customIDs?t.customIDs:{},o=[`uid:${null!==(n=null==t?void 0:t.userID)&&void 0!==n?n:""}`,`cids:${Object.keys(i).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${i[e]}`).join(",")}`,`k:${e}`];return(0,s._DJB2)(o.join("|"))}t._getUserStorageKey=n,t._getStorageKey=function(e,t,r){return t?n(e,t,r):(0,s._DJB2)(`k:${e}`)}},"./node_modules/@statsig/client-core/src/ClientInterfaces.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/DataAdapterCore.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;let n=r("./node_modules/@statsig/client-core/src/Log.js"),i=r("./node_modules/@statsig/client-core/src/StableID.js"),o=r("./node_modules/@statsig/client-core/src/StatsigUser.js"),a=r("./node_modules/@statsig/client-core/src/StorageProvider.js"),l=r("./node_modules/@statsig/client-core/src/TypedJsonParse.js");function c(e,t,r,s){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,o._getFullUserHash)(s)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new u}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,o._normalizeUser)(e,this._options),r=this._getCacheKey(t),s=this._inMemoryCache.get(r,t);if(s)return s;let n=this._loadFromCache(r);return n?(this._inMemoryCache.add(r,n),this._inMemoryCache.get(r,t)):null}setData(e,t){let r=t&&(0,o._normalizeUser)(t,this._options),s=this._getCacheKey(r);this._inMemoryCache.add(s,c("Bootstrap",e,null,r))}_getDataAsyncImpl(e,t,r){return s(this,void 0,void 0,function*(){a.Storage.isReady()||(yield a.Storage.isReadyResolver());let s=null!=e?e:this.getDataSync(t),i=[this._fetchAndPrepFromNetwork(s,t,r)];return(null==r?void 0:r.timeoutMs)&&i.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(n.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(i)})}_prefetchDataImpl(e,t){return s(this,void 0,void 0,function*(){let r=e&&(0,o._normalizeUser)(e,this._options),s=this._getCacheKey(r),n=yield this._getDataAsyncImpl(null,r,t);n&&this._inMemoryCache.add(s,Object.assign(Object.assign({},n),{source:"Prefetch"}))})}_fetchAndPrepFromNetwork(e,t,r){var o;return s(this,void 0,void 0,function*(){let s=null!==(o=null==e?void 0:e.data)&&void 0!==o?o:null,a=null!=e&&this._isCachedResultValidFor204(e,t),u=yield this._fetchFromNetwork(s,t,r,a);if(!u)return n.Log.debug("No response returned for latest value"),null;let d=(0,l._typedJsonParse)(u,"has_updates","Response"),h=this._getSdkKey(),p=i.StableID.get(h),m=null;if((null==d?void 0:d.has_updates)===!0)m=c("Network",u,p,t);else{if(!s||(null==d?void 0:d.has_updates)!==!1)return null;m=c("NetworkNotModified",s,p,t)}let f=this._getCacheKey(t);return this._inMemoryCache.add(f,m),this._writeToCache(f,m),m})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(n.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let r=null===(t=a.Storage.getItem)||void 0===t?void 0:t.call(a.Storage,e);if(null==r)return null;let s=(0,l._typedJsonParse)(r,"source","Cached Result");return s?Object.assign(Object.assign({},s),{source:"Cache"}):null}_writeToCache(e,t){a.Storage.setItem(e,JSON.stringify(t)),this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e){var t;let r=null!==(t=(0,a._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==t?t:{};r[e]=Date.now();let s=d(r,10);s&&(delete r[s],a.Storage.removeItem(s)),(0,a._setObjectInStorage)(this._lastModifiedStoreKey,r)}},t._makeDataAdapterResult=c;class u{constructor(){this._data={}}get(e,t){var r;let s=this._data[e],i=null==s?void 0:s.stableID,o=null===(r=null==t?void 0:t.customIDs)||void 0===r?void 0:r.stableID;return o&&i&&o!==i?(n.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):s}add(e,t){let r=d(this._data,9);r&&delete this._data[r],this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function d(e,t){let r=Object.keys(e);return r.length<=t?null:r.reduce((t,r)=>{let s=e[t],n=e[r];return"object"==typeof s&&"object"==typeof n?n.receivedAt{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;let r=new Map,s="start";function n(e,t,r,s){return Object.assign({key:r,action:t,step:s,timestamp:Date.now()},e)}function i(e,t){var s;let n=null!==(s=r.get(e))&&void 0!==s?s:[];n.push(t),r.set(e,n)}function o(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{i(e,n({},s,"overall"))},_markInitOverallEnd:(e,t,r)=>{i(e,n({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{i(e,n(t,s,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{i(e,n(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{i(e,n({},s,"initialize","process"))},_markInitProcessEnd:(e,t)=>{i(e,n(t,"end","initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:o(e,"code"),name:o(e,"name"),message:o(e,"message")}},_getDiagnosticsData(e,r,s,n){var i;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null===(i=null==e?void 0:e.headers)||void 0===i?void 0:i.get("x-statsig-region"),isDelta:!0===s.includes('"is_delta":true')||void 0,attempt:r,error:t.Diagnostics._formatError(n)}},_enqueueDiagnosticsEvent(e,r,s,n){let i=t.Diagnostics._getMarkers(s);if(null==i||i.length<=0)return -1;let o=i[i.length-1].timestamp-i[0].timestamp;t.Diagnostics._clearMarkers(s);let a={eventName:"statsig::diagnostics",user:e,value:null,metadata:{context:"initialize",markers:i.slice(),statsigOptions:n},time:Date.now()};return r.enqueue(a),o}}},"./node_modules/@statsig/client-core/src/DnsTxtQuery.js":function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;let s=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),n=["i","e","d"];t._fetchTxtRecords=function(e){return r(this,void 0,void 0,function*(){let t=yield e("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:s});if(!t.ok){let e=Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}return function(e){let t=e.findIndex((t,r)=>r<200&&"="===String.fromCharCode(t)&&n.includes(String.fromCharCode(e[r-1])));if(-1===t){let e=Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let r="";for(let s=t-1;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/ErrorBoundary.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;let n=r("./node_modules/@statsig/client-core/src/Log.js"),i=r("./node_modules/@statsig/client-core/src/SDKType.js"),o=r("./node_modules/@statsig/client-core/src/StatsigMetadata.js");t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let a="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}t.ErrorBoundary=class{constructor(e,t,r,s){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=s,this._seen=new Set}wrap(e){try{(function(e){let t=new Set,r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter(e=>"function"==typeof(null==r?void 0:r[e])).forEach(e=>t.add(e)),r=Object.getPrototypeOf(r);return Array.from(t)})(e).forEach(t=>{let r=e[t];"$EB"in r||(e[t]=(...s)=>this._capture(t,()=>r.apply(e,s)),e[t].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=l(e))}_capture(e,t){try{let r=t();if(r&&r instanceof Promise)return r.catch(t=>this._onError(e,t));return r}catch(t){return this._onError(e,t),null}}_onError(e,r){try{n.Log.warn(`Caught error in ${e}`,{error:r}),s(this,void 0,void 0,function*(){var s,n,c,u,d,h,p;let m=r||Error(a),f=m instanceof Error,g=f?m.name:"No Name",y=l(m);if(this._lastSeenError=y,this._seen.has(g))return;if(this._seen.add(g),null===(n=null===(s=this._options)||void 0===s?void 0:s.networkConfig)||void 0===n?void 0:n.preventAllNetworkTraffic){null===(c=this._emitter)||void 0===c||c.call(this,{name:"error",error:r,tag:e});return}let v=i.SDKType._get(this._sdkKey),b=o.StatsigMetadataProvider.get(),_=f?m.stack:function(e){try{return JSON.stringify(e)}catch(e){return a}}(m),w=Object.assign({tag:e,exception:g,info:_,statsigOptions:function(e){if(!e)return{};let t={};return Object.entries(e).forEach(([e,r])=>{switch(typeof r){case"number":case"bigint":case"boolean":t[String(e)]=r;break;case"string":r.length<50?t[String(e)]=r:t[String(e)]="set";break;case"object":"environment"===e?t.environment=r:"networkConfig"===e?t.networkConfig=r:t[String(e)]=null!=r?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},b),{sdkType:v})),C=null!==(h=null===(d=null===(u=this._options)||void 0===u?void 0:u.networkConfig)||void 0===d?void 0:d.networkOverrideFunc)&&void 0!==h?h:fetch;yield C(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(v),"STATSIG-SDK-VERSION":String(b.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(w)}),null===(p=this._emitter)||void 0===p||p.call(this,{name:"error",error:r,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}},"./node_modules/@statsig/client-core/src/EvaluationOptions.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/EvaluationTypes.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/EventLogger.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;let n=r("./node_modules/@statsig/client-core/src/CacheKey.js"),i=r("./node_modules/@statsig/client-core/src/Hashing.js"),o=r("./node_modules/@statsig/client-core/src/Log.js"),a=r("./node_modules/@statsig/client-core/src/NetworkConfig.js"),l=r("./node_modules/@statsig/client-core/src/SafeJs.js"),c=r("./node_modules/@statsig/client-core/src/StatsigEvent.js"),u=r("./node_modules/@statsig/client-core/src/StorageProvider.js"),d=r("./node_modules/@statsig/client-core/src/UrlConfiguration.js"),h=r("./node_modules/@statsig/client-core/src/VisibilityObserving.js"),p={},m={Startup:"startup",GainedFocus:"gained_focus"};class f{static _safeFlushAndForget(e){var t;null===(t=p[e])||void 0===t||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null===(t=p[e])||void 0===t||t._retryFailedLogs(m.GainedFocus)}constructor(e,t,r,s){var n;this._sdkKey=e,this._emitter=t,this._network=r,this._options=s,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._isLoggingDisabled=(null==s?void 0:s.disableLogging)===!0,this._maxQueueSize=null!==(n=null==s?void 0:s.loggingBufferMaxSize)&&void 0!==n?n:100;let i=null==s?void 0:s.networkConfig;this._logEventUrlConfig=new d.UrlConfiguration(a.Endpoint._rgstr,null==i?void 0:i.logEventUrl,null==i?void 0:i.api,null==i?void 0:i.logEventFallbackUrls)}setLoggingDisabled(e){this._isLoggingDisabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&f._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;let r=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=r+1}reset(){this._lastExposureTimeMap={}}start(){(0,l._isServerEnv)()||(p[this._sdkKey]=this,(0,h._subscribeToVisiblityChanged)(e=>{"background"===e?f._safeFlushAndForget(this._sdkKey):"foreground"===e&&f._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(m.Startup),this._startBackgroundFlushInterval())}stop(){return s(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete p[this._sdkKey],yield this.flush()})}flush(){return s(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;let e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){!this._hasRunQuickFlush&&(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>f._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){if((0,l._isServerEnv)())return!1;if(!(0,c._isExposureEvent)(e))return!0;let t=e.user?e.user:{statsigEnvironment:void 0},r=(0,n._getUserStorageKey)(this._sdkKey,t),s=e.metadata?e.metadata:{},i=[e.eventName,r,s.gate,s.config,s.ruleID,s.allocatedExperiment,s.parameterName,String(s.isExplicitParameter),s.reason].join("|"),o=this._lastExposureTimeMap[i],a=Date.now();return(!o||!(a-o<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[i]=a,!0)}_sendEvents(e){var t,r;return s(this,void 0,void 0,function*(){if(this._isLoggingDisabled)return this._saveFailedLogsToStorage(e),!1;try{let s=(0,h._isUnloading)()&&this._network.isBeaconSupported()&&(null===(r=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===r?void 0:r.networkOverrideFunc)==null;if(this._emitter({name:"pre_logs_flushed",events:e}),(s?yield this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success)return this._emitter({name:"logs_flushed",events:e}),!0;return o.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1}catch(e){return o.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){var t;return s(this,void 0,void 0,function*(){let r=yield this._network.post(this._getRequestData(e)),s=null!==(t=null==r?void 0:r.code)&&void 0!==t?t:-1;return{success:s>=200&&s<300}})}_sendEventsViaBeacon(e){return s(this,void 0,void 0,function*(){return{success:yield this._network.beacon(this._getRequestData(e))}})}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventCount]:String(e.length)}}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();let t=this._getStorageKey();try{(0,u._setObjectInStorage)(t,e)}catch(e){o.Log.warn("Unable to save failed logs to storage")}}_retryFailedLogs(e){let t=this._getStorageKey();s(this,void 0,void 0,function*(){u.Storage.isReady()||(yield u.Storage.isReadyResolver());let r=(0,u._getObjectFromStorage)(t);r&&(e===m.Startup&&u.Storage.removeItem(t),(yield this._sendEvents(r))&&e===m.GainedFocus&&u.Storage.removeItem(t))}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,i._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});let s=Object.assign(Object.assign({},e),t);o.Log.debug("Enqueued Event:",s),this._queue.push(s)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if((null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;let r=setInterval(()=>{let e=p[this._sdkKey];e&&e._flushIntervalId===r?f._safeFlushAndForget(this._sdkKey):clearInterval(r)},null!==(t=null===(e=this._options)||void 0===e?void 0:e.loggingIntervalMs)&&void 0!==t?t:1e4);this._flushIntervalId=r}}t.EventLogger=f},"./node_modules/@statsig/client-core/src/Hashing.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;let s=r("./node_modules/@statsig/client-core/src/TypingUtils.js");t._DJB2=e=>{let t=0;for(let r=0;r>>0)},t._DJB2Object=(e,r)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,r))),t._getSortedObject=(e,r)=>{if(null==e)return null;let n=Object.keys(e).sort(),i={};return n.forEach(n=>{let o=e[n];if(0===r||"object"!==(0,s._typeOf)(o)){i[n]=o;return}i[n]=(0,t._getSortedObject)(o,null!=r?r-1:r)}),i}},"./node_modules/@statsig/client-core/src/InitializeResponse.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/Log.js":(e,t)=>{"use strict";function r(e){return e.unshift("[Statsig]"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0,t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class s{static info(...e){s.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){s.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){s.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){s.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}t.Log=s,s.level=t.LogLevel.Warn},"./node_modules/@statsig/client-core/src/MemoKey.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_layer:"l",_paramStore:"p"};let r=new Set([]),s=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,n){let i=`${e}|${t}`;if(!n)return i;for(let e of Object.keys(n)){if(s.has(e))return;r.has(e)?i+=`|${e}=true`:i+=`|${e}=${n[e]}`}return i}},"./node_modules/@statsig/client-core/src/NetworkConfig.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},"./node_modules/@statsig/client-core/src/NetworkCore.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r("./node_modules/@statsig/client-core/src/$_StatsigGlobal.js");let n=r("./node_modules/@statsig/client-core/src/$_StatsigGlobal.js"),i=r("./node_modules/@statsig/client-core/src/Diagnostics.js"),o=r("./node_modules/@statsig/client-core/src/Log.js"),a=r("./node_modules/@statsig/client-core/src/NetworkConfig.js"),l=r("./node_modules/@statsig/client-core/src/NetworkFallbackResolver.js"),c=r("./node_modules/@statsig/client-core/src/SDKFlags.js"),u=r("./node_modules/@statsig/client-core/src/SDKType.js"),d=r("./node_modules/@statsig/client-core/src/SafeJs.js"),h=r("./node_modules/@statsig/client-core/src/SessionID.js"),p=r("./node_modules/@statsig/client-core/src/StableID.js"),m=r("./node_modules/@statsig/client-core/src/StatsigClientEventEmitter.js"),f=r("./node_modules/@statsig/client-core/src/StatsigMetadata.js"),g=r("./node_modules/@statsig/client-core/src/VisibilityObserving.js"),y=new Set([408,500,502,503,504,522,524,599]);t.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new l.NetworkFallbackResolver(this._options)}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){let e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){return s(this,void 0,void 0,function*(){if(!v(e))return!1;let t=this._getInternalRequestArgs("POST",e);yield this._tryToCompressBody(t);let r=yield this._getPopulatedURL(t),s=navigator;return s.sendBeacon.bind(s)(r,t.body)})}post(e){return s(this,void 0,void 0,function*(){let t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){var t,r,n,l;return s(this,void 0,void 0,function*(){if(!v(e)||this._netConfig.preventAllNetworkTraffic)return null;let{method:c,body:u,retries:d,attempt:h}=e,p=e.urlConfig.endpoint;if(this._isRateLimited(p))return o.Log.warn(`Request to ${p} was blocked because you are making requests too frequently.`),null;let f=null!=h?h:1,b="undefined"!=typeof AbortController?new AbortController:null,w=setTimeout(()=>{null==b||b.abort(`Timeout of ${this._timeout}ms expired.`)},this._timeout),C=yield this._getPopulatedURL(e),O=null,k=(0,g._isUnloading)();try{let r={method:c,body:u,headers:Object.assign({},e.headers),signal:null==b?void 0:b.signal,priority:e.priority,keepalive:k};e.urlConfig.endpoint===a.Endpoint._initialize&&i.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:f});let s=this._leakyBucket[p];s&&(s.lastRequestTime=Date.now(),this._leakyBucket[p]=s);let n=null!==(t=this._netConfig.networkOverrideFunc)&&void 0!==t?t:fetch;if(O=yield n(C,r),clearTimeout(w),!O.ok){let e=yield O.text().catch(()=>"No Text"),t=Error(`NetworkError: ${C} ${e}`);throw t.name="NetworkError",t}let o=yield O.text();return _(e,O,f,o),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:o,code:O.status}}catch(a){let t=(null==b?void 0:b.signal.aborted)&&"string"==typeof b.signal.reason?b.signal.reason:"string"==typeof a?a:a instanceof Error?`${a.name}: ${a.message}`:"Unknown Error",i=(null==b?void 0:b.signal.aborted)&&"string"==typeof b.signal.reason&&b.signal.reason.includes("Timeout")||!1;if(_(e,O,f,"",a),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,i))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!d||f>d||!y.has(null!==(r=null==O?void 0:O.status)&&void 0!==r?r:500)){null===(n=this._emitter)||void 0===n||n.call(this,{name:"error",error:a,tag:m.ErrorTag.NetworkError,requestArgs:e});let r=`A networking error occurred during ${c} request to ${C}.`;return o.Log.error(r,t,a),null===(l=this._errorBoundary)||void 0===l||l.attachErrorIfNoneExists(r),null}return yield function(e){return s(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}(f),this._sendRequest(Object.assign(Object.assign({},e),{retries:d,attempt:f+1}))}})}_isRateLimited(e){var t;let r=Date.now(),s=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:r},n=Math.floor((r-s.lastRequestTime)*.05);return s.count=Math.max(0,s.count-n),s.count>=50||(s.count+=1,s.lastRequestTime=r,this._leakyBucket[e]=s,!1)}_getPopulatedURL(e){var t;return s(this,void 0,void 0,function*(){let r=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===a.Endpoint._initialize||e.urlConfig.endpoint===a.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=r);let s=Object.assign({[a.NetworkParam.SdkKey]:e.sdkKey,[a.NetworkParam.SdkType]:u.SDKType._get(e.sdkKey),[a.NetworkParam.SdkVersion]:f.SDK_VERSION,[a.NetworkParam.Time]:String(Date.now()),[a.NetworkParam.SessionID]:h.SessionID.get(e.sdkKey)},e.params),n=Object.keys(s).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(s[e])}`).join("&");return`${r}${n?`?${n}`:""}`})}_tryEncodeBody(e){var t;let r=(0,d._getWindowSafe)(),s=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof s&&null==(0,n._getStatsigGlobalFlag)("no-encode")&&(null==r?void 0:r.btoa))try{e.body=r.btoa(s).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[a.NetworkParam.StatsigEncoded]:"1"})}catch(t){o.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){var t;return s(this,void 0,void 0,function*(){var r;let s=e.body;if("string"==typeof s&&(r=this._options,e.isCompressable&&!r.disableCompression&&(null==e.urlConfig.customUrl&&null==e.urlConfig.fallbackUrls||!0===c.SDKFlags.get(e.sdkKey,"enable_log_event_compression"))&&null==(0,n._getStatsigGlobalFlag)("no-compress")&&"undefined"!=typeof CompressionStream&&"undefined"!=typeof TextEncoder))try{let r;let n=new TextEncoder().encode(s),i=new CompressionStream("gzip"),l=i.writable.getWriter();l.write(n).catch(o.Log.error),l.close().catch(o.Log.error);let c=i.readable.getReader(),u=[];for(;!(r=yield c.read()).done;)u.push(r.value);let d=u.reduce((e,t)=>e+t.length,0),h=new Uint8Array(d),p=0;for(let e of u)h.set(e,p),p+=e.length;e.body=h,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[a.NetworkParam.IsGzipped]:"1"})}catch(t){o.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){let r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),s=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&b(s,t.data),s}};let v=e=>!!e.sdkKey||(o.Log.warn("Unable to make request without an SDK key"),!1),b=(e,t)=>{let{sdkKey:r,fallbackUrl:s}=e,n=p.StableID.get(r),i=h.SessionID.get(r),o=u.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},f.StatsigMetadataProvider.get()),{stableID:n,sessionID:i,sdkType:o,fallbackUrl:s})}))};function _(e,t,r,s,n){e.urlConfig.endpoint===a.Endpoint._initialize&&i.Diagnostics._markInitNetworkReqEnd(e.sdkKey,i.Diagnostics._getDiagnosticsData(t,r,s,n))}},"./node_modules/@statsig/client-core/src/NetworkFallbackResolver.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;let n=r("./node_modules/@statsig/client-core/src/DnsTxtQuery.js"),i=r("./node_modules/@statsig/client-core/src/Hashing.js"),o=r("./node_modules/@statsig/client-core/src/Log.js"),a=r("./node_modules/@statsig/client-core/src/StorageProvider.js");function l(e,t){var r;let s=null!==(r=null==e?void 0:e.toLowerCase())&&void 0!==r?r:"";return t||s.includes("uncaught exception")||s.includes("failed to fetch")||s.includes("networkerror when attempting to fetch resource")}function c(e){return`statsig.network_fallback.${(0,i._DJB2)(e)}`}function u(e,t){let r=c(e);if(!t||0===Object.keys(t).length){a.Storage.removeItem(r);return}a.Storage.setItem(r,JSON.stringify(t))}t.NetworkFallbackResolver=class{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null===(t=e.networkConfig)||void 0===t?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r;let s=null===(r=this._fallbackInfo)||void 0===r?void 0:r[t.endpoint];s&&(s.expiryTime=Date.now()+6048e5,u(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:s})))}getActiveFallbackUrl(e,t){var r,s;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let n=this._fallbackInfo;null==n&&(n=null!==(r=function(e){let t=c(e),r=a.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return o.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==r?r:{},this._fallbackInfo=n);let i=n[t.endpoint];return!i||Date.now()>(null!==(s=i.expiryTime)&&void 0!==s?s:0)||t.getChecksum()!==i.urlConfigChecksum?(delete n[t.endpoint],this._fallbackInfo=n,u(e,this._fallbackInfo),null):i.url?i.url:null}tryFetchUpdatedFallbackInfo(e,t,r,n){var i,o;return s(this,void 0,void 0,function*(){try{if(!l(r,n))return!1;let s=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,o=this._pickNewFallbackUrl(null===(i=this._fallbackInfo)||void 0===i?void 0:i[t.endpoint],s);if(!o)return!1;return this._updateFallbackInfoWithNewUrl(e,t,o),!0}catch(e){return null===(o=this._errorBoundary)||void 0===o||o.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var s,n,i;let o={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},a=t.endpoint,l=null===(s=this._fallbackInfo)||void 0===s?void 0:s[a];l&&o.previous.push(...l.previous),o.previous.length>10&&(o.previous=[]);let c=null===(i=null===(n=this._fallbackInfo)||void 0===n?void 0:n[a])||void 0===i?void 0:i.url;null!=c&&o.previous.push(c),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[a]:o}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){var t;return s(this,void 0,void 0,function*(){let r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),s.push(`https://${e}${o}`)}}return s})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;let s=new Set(null!==(r=null==e?void 0:e.previous)&&void 0!==r?r:[]),n=null==e?void 0:e.url,i=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!s.has(e)&&t!==n){i=t;break}}return i}},t._isDomainFailure=l},"./node_modules/@statsig/client-core/src/OverrideAdapter.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/ParamStoreTypes.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/SDKFlags.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;let r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{var s,n;return null!==(n=null===(s=r[e])||void 0===s?void 0:s[t])&&void 0!==n&&n}}},"./node_modules/@statsig/client-core/src/SDKType.js":(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;let s={};t.SDKType={_get:e=>{var t;return(null!==(t=s[e])&&void 0!==t?t:"js-mono")+(null!=r?r:"")},_setClientType(e,t){s[e]=t},_setBindingType(e){r&&"-react"!==r||(r="-"+e)}}},"./node_modules/@statsig/client-core/src/SafeJs.js":(e,t,r)=>{"use strict";var s=r("./node_modules/process/browser.js");Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0,t._getWindowSafe=()=>"undefined"!=typeof window?window:null,t._getDocumentSafe=()=>{var e;let r=(0,t._getWindowSafe)();return null!==(e=null==r?void 0:r.document)&&void 0!==e?e:null},t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;let e=void 0!==s&&null!=s.versions&&null!=s.versions.node;return"string"==typeof EdgeRuntime||e},t._addWindowEventListenerSafe=(e,r)=>{let s=(0,t._getWindowSafe)();"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener(e,r)},t._addDocumentEventListenerSafe=(e,r)=>{let s=(0,t._getDocumentSafe)();"function"==typeof(null==s?void 0:s.addEventListener)&&s.addEventListener(e,r)},t._getCurrentPageUrlSafe=()=>{var e;try{return null===(e=(0,t._getWindowSafe)())||void 0===e?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},t._getUnloadEvent=()=>{let e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},"./node_modules/@statsig/client-core/src/SessionID.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;let s=r("./node_modules/@statsig/client-core/src/CacheKey.js"),n=r("./node_modules/@statsig/client-core/src/Log.js"),i=r("./node_modules/@statsig/client-core/src/StorageProvider.js"),o=r("./node_modules/@statsig/client-core/src/UUID.js"),a={};function l(e,t){return setTimeout(()=>{let t=null==__STATSIG__?void 0:__STATSIG__.instance(e);t&&t.$emt({name:"session_expired"})},t)}function c(e){return`statsig.session_id.${(0,s._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>(null==a[e]&&(a[e]=function(e){let t=function(e){let t=c(e);return(0,i._getObjectFromStorage)(t)}(e),r=Date.now();return t||(t={sessionID:(0,o.getUUID)(),startTime:r,lastUpdate:r}),{data:t,sdkKey:e}}(e)),function(e){let t=Date.now(),r=e.data;((function({lastUpdate:e}){return Date.now()-e>18e5})(r)||function({startTime:e}){return Date.now()-e>144e5}(r))&&(r.sessionID=(0,o.getUUID)(),r.startTime=t),r.lastUpdate=t,function(e,t){let r=c(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){n.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);let s=t-r.startTime,a=e.sdkKey;return e.idleTimeoutID=l(a,18e5),e.ageTimeoutID=l(a,144e5-s),e}(a[e])),overrideInitialSessionID:(e,t)=>{a[t]=function(e,t){let r=Date.now();return{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t}}(e,t)}}},"./node_modules/@statsig/client-core/src/StableID.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StableID=void 0;let s=r("./node_modules/@statsig/client-core/src/CacheKey.js"),n=r("./node_modules/@statsig/client-core/src/Log.js"),i=r("./node_modules/@statsig/client-core/src/StorageProvider.js"),o=r("./node_modules/@statsig/client-core/src/UUID.js"),a={};function l(e){return`statsig.stable_id.${(0,s._getStorageKey)(e)}`}function c(e,t){let r=l(t);try{(0,i._setObjectInStorage)(r,e)}catch(e){n.Log.warn("Failed to save StableID")}}t.StableID={get:e=>{if(null==a[e]){let t=function(e){let t=l(e);return(0,i._getObjectFromStorage)(t)}(e);null==t&&c(t=(0,o.getUUID)(),e),a[e]=t}return a[e]},setOverride:(e,t)=>{a[t]=e,c(e,t)}}},"./node_modules/@statsig/client-core/src/StatsigClientBase.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r("./node_modules/@statsig/client-core/src/$_StatsigGlobal.js");let n=r("./node_modules/@statsig/client-core/src/$_StatsigGlobal.js"),i=r("./node_modules/@statsig/client-core/src/ErrorBoundary.js"),o=r("./node_modules/@statsig/client-core/src/EventLogger.js"),a=r("./node_modules/@statsig/client-core/src/Log.js"),l=r("./node_modules/@statsig/client-core/src/MemoKey.js"),c=r("./node_modules/@statsig/client-core/src/SafeJs.js"),u=r("./node_modules/@statsig/client-core/src/SessionID.js"),d=r("./node_modules/@statsig/client-core/src/StorageProvider.js");t.StatsigClientBase=class{constructor(e,t,r,s){var l;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};let h=this.$emt.bind(this);(null==s?void 0:s.logLevel)!=null&&(a.Log.level=s.logLevel),(null==s?void 0:s.disableStorage)&&d.Storage._setDisabled(!0),(null==s?void 0:s.initialSessionID)&&u.StatsigSession.overrideInitialSessionID(s.initialSessionID,e),(null==s?void 0:s.storageProvider)&&d.Storage._setProvider(s.storageProvider),this._sdkKey=e,this._options=null!=s?s:{},this._memoCache={},this.overrideAdapter=null!==(l=null==s?void 0:s.overrideAdapter)&&void 0!==l?l:null,this._logger=new o.EventLogger(e,h,r,s),this._errorBoundary=new i.ErrorBoundary(e,s,h),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,s,r),this.storageProvider=d.Storage,this._primeReadyRipcord(),function(e,t){var r;if((0,c._isServerEnv)())return;let s=(0,n._getStatsigGlobal)(),i=null!==(r=s.instances)&&void 0!==r?r:{};null!=i[e]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),i[e]=t,s.firstInstance||(s.firstInstance=t),s.instances=i,__STATSIG__=s}(e,this)}updateRuntimeOptions(e){null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingDisabled(e.disableLogging)),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,d.Storage._setDisabled(e.disableStorage))}flush(){return this._logger.flush()}shutdown(){return s(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){let r=this._listeners[e].indexOf(t);-1!==r&&this._listeners[e].splice(r,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;let r=t=>{try{t(e)}catch(r){if(!0===t.__isInternal){this._errorBoundary.logError(`__emit:${e.name}`,r);return}a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach(e=>r(e)),null===(t=this._listeners["*"])||void 0===t||t.forEach(r)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){if((null==r?void 0:r.disableExposureLog)===!0){this._logger.incrementNonExposureCount(e);return}this._logger.enqueue(t)}_memoize(e,t){return(r,s)=>{if(this._options.disableEvaluationMemoization)return t(r,s);let n=(0,l.createMemoKey)(e,r,s);return n?(n in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[n]=t(r,s)),this._memoCache[n]):t(r,s)}}}},"./node_modules/@statsig/client-core/src/StatsigClientEventEmitter.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},"./node_modules/@statsig/client-core/src/StatsigDataAdapter.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},"./node_modules/@statsig/client-core/src/StatsigEvent.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;let r="statsig::config_exposure",s="statsig::gate_exposure",n="statsig::layer_exposure",i=(e,t,r,s,n)=>(r.bootstrapMetadata&&(s.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:a(r,s),secondaryExposures:n,time:Date.now()});function o(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._isExposureEvent=({eventName:e})=>e===s||e===r||e===n,t._createGateExposure=(e,t,r)=>{var n,a,l;let c={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null===(n=t.__evaluation)||void 0===n?void 0:n.version)!=null&&(c.configVersion=t.__evaluation.version),i(s,e,t.details,c,o(null!==(l=null===(a=t.__evaluation)||void 0===a?void 0:a.secondary_exposures)&&void 0!==l?l:[],r))},t._mapExposures=o,t._createConfigExposure=(e,t,s)=>{var n,a,l,c;let u={config:t.name,ruleID:t.ruleID};return(null===(n=t.__evaluation)||void 0===n?void 0:n.version)!=null&&(u.configVersion=t.__evaluation.version),(null===(a=t.__evaluation)||void 0===a?void 0:a.passed)!=null&&(u.rulePassed=String(t.__evaluation.passed)),i(r,e,t.details,u,o(null!==(c=null===(l=t.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],s))},t._createLayerParameterExposure=(e,t,r,s)=>{var a,l,c,u;let d=t.__evaluation,h=(null===(a=null==d?void 0:d.explicit_parameters)||void 0===a?void 0:a.includes(r))===!0,p="",m=null!==(l=null==d?void 0:d.undelegated_secondary_exposures)&&void 0!==l?l:[];h&&(p=null!==(c=d.allocated_experiment_name)&&void 0!==c?c:"",m=d.secondary_exposures);let f={config:t.name,parameterName:r,ruleID:t.ruleID,allocatedExperiment:p,isExplicitParameter:String(h)};return(null===(u=t.__evaluation)||void 0===u?void 0:u.version)!=null&&(f.configVersion=t.__evaluation.version),i(n,e,t.details,f,o(m,s))};let a=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},"./node_modules/@statsig/client-core/src/StatsigMetadata.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.14.1";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},"./node_modules/@statsig/client-core/src/StatsigOptionsCommon.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/StatsigPlugin.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/StatsigTypeFactories.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;let s=r("./node_modules/@statsig/client-core/src/Log.js"),n=r("./node_modules/@statsig/client-core/src/TypingUtils.js");function i(e,t,r,s){var n;return{name:e,details:t,ruleID:null!==(n=null==r?void 0:r.rule_id)&&void 0!==n?n:"default",__evaluation:r,value:s}}function o(e,t,r){var s;let n=null!==(s=null==r?void 0:r.value)&&void 0!==s?s:{};return Object.assign(Object.assign({},i(e,t,r,n)),{get:a(e,null==r?void 0:r.value)})}function a(e,t,r){return(i,o)=>{var a;let l=null!==(a=null==t?void 0:t[i])&&void 0!==a?a:null;return null==l?null!=o?o:null:null==o||(0,n._isTypeMatch)(l,o)?(null==r||r(i),l):(s.Log.warn(`Parameter type mismatch. '${e}.${i}' was found to be type '${typeof l}' but fallback/return type is '${typeof o}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=o?o:null)}}t._makeFeatureGate=function(e,t,r){return i(e,t,r,(null==r?void 0:r.value)===!0)},t._makeDynamicConfig=o,t._makeExperiment=function(e,t,r){var s;return Object.assign(Object.assign({},o(e,t,r)),{groupName:null!==(s=null==r?void 0:r.group_name)&&void 0!==s?s:null})},t._makeLayer=function(e,t,r,s){var n,o;return Object.assign(Object.assign({},i(e,t,r,void 0)),{get:a(e,null==r?void 0:r.value,s),groupName:null!==(n=null==r?void 0:r.group_name)&&void 0!==n?n:null,__value:null!==(o=null==r?void 0:r.value)&&void 0!==o?o:{}})},t._mergeOverride=function(e,t,r,s){return Object.assign(Object.assign(Object.assign({},e),t),{get:a(e.name,r,s)})},t._makeTypedGet=a},"./node_modules/@statsig/client-core/src/StatsigTypes.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},"./node_modules/@statsig/client-core/src/StatsigUpdateDetails.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0,t.createUpdateDetails=(e,t,r,s,n,i)=>({duration:r,source:t,success:e,error:s,sourceUrl:n,warnings:i}),t.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},"./node_modules/@statsig/client-core/src/StatsigUser.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;let s=r("./node_modules/@statsig/client-core/src/Hashing.js"),n=r("./node_modules/@statsig/client-core/src/Log.js");t._normalizeUser=function(e,t,r){try{let s=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?s.statsigEnvironment=t.environment:null!=r&&(s.statsigEnvironment={tier:r}),s}catch(e){return n.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,s._DJB2Object)(e):null}},"./node_modules/@statsig/client-core/src/StorageProvider.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;let s=r("./node_modules/@statsig/client-core/src/Log.js"),n=r("./node_modules/@statsig/client-core/src/SafeJs.js"),i={},o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>i[e]?i[e]:null,setItem:(e,t)=>{i[e]=t},removeItem:e=>{delete i[e]},getAllKeys:()=>Object.keys(i)},a=null;try{let e=(0,n._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(a={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,r)=>e.localStorage.setItem(t,r),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(e){s.Log.warn("Failed to setup localStorageProvider.")}let l=null!=a?a:o,c=l;t.Storage={isReady:()=>c.isReady(),isReadyResolver:()=>c.isReadyResolver(),getProviderName:()=>c.getProviderName(),getItem:e=>(function(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(o),null;throw e}})(()=>c.getItem(e)),setItem:(e,t)=>c.setItem(e,t),removeItem:e=>c.removeItem(e),getAllKeys:()=>c.getAllKeys(),_setProvider:e=>{l=e,c=e},_setDisabled:e=>{c=e?o:l}},t._getObjectFromStorage=function(e){let r=t.Storage.getItem(e);return JSON.parse(null!=r?r:"null")},t._setObjectInStorage=function(e,r){t.Storage.setItem(e,JSON.stringify(r))}},"./node_modules/@statsig/client-core/src/TypedJsonParse.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;let s=r("./node_modules/@statsig/client-core/src/Log.js");t._typedJsonParse=function(e,t,r){try{let r=JSON.parse(e);if(r&&"object"==typeof r&&t in r)return r}catch(e){}return s.Log.error(`Failed to parse ${r}`),null}},"./node_modules/@statsig/client-core/src/TypingUtils.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){let r=e=>Array.isArray(e)?"array":typeof e;return r(e)===r(t)}},"./node_modules/@statsig/client-core/src/UUID.js":(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,r="89ab"[Math.floor(4*Math.random())];return`xxxxxxxx-xxxx-4xxx-${r}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,r=>{let s=16*Math.random();return e>0?(s=(e+s)%16|0,e=Math.floor(e/16)):(s=(t+s)%16|0,t=Math.floor(t/16)),("x"===r?s:7&s|8).toString(16)})}},"./node_modules/@statsig/client-core/src/UrlConfiguration.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;let s=r("./node_modules/@statsig/client-core/src/Hashing.js"),n=r("./node_modules/@statsig/client-core/src/NetworkConfig.js"),i={[n.Endpoint._initialize]:"i",[n.Endpoint._rgstr]:"e",[n.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,s){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=i[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),s&&(this.fallbackUrls=s);let o=n.NetworkDefault[e];this.defaultUrl=`${o}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var e;let t=(null!==(e=this.fallbackUrls)&&void 0!==e?e:[]).sort().join(",");return(0,s._DJB2)(this.customUrl+t)}}},"./node_modules/@statsig/client-core/src/VisibilityObserving.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;let s=r("./node_modules/@statsig/client-core/src/SafeJs.js"),n="foreground",i="background",o=[],a=n,l=!1;t._isCurrentlyVisible=()=>a===n,t._isUnloading=()=>l,t._subscribeToVisiblityChanged=e=>{o.unshift(e)},t._notifyVisibilityChanged=e=>{e!==a&&(a=e,o.forEach(t=>t(e)))},(0,s._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,t._notifyVisibilityChanged)(n)}),(0,s._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(i)),(0,s._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?n:i)}),(0,s._addWindowEventListenerSafe)((0,s._getUnloadEvent)(),()=>{l=!0,(0,t._notifyVisibilityChanged)(i)})},"./node_modules/@statsig/client-core/src/index.js":function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r("./node_modules/@statsig/client-core/src/$_StatsigGlobal.js");let i=r("./node_modules/@statsig/client-core/src/Diagnostics.js");Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});let o=r("./node_modules/@statsig/client-core/src/EventLogger.js");Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return o.EventLogger}});let a=r("./node_modules/@statsig/client-core/src/Log.js");Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return a.Log}});let l=r("./node_modules/@statsig/client-core/src/StatsigMetadata.js"),c=r("./node_modules/@statsig/client-core/src/StorageProvider.js");Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return c.Storage}}),n(r("./node_modules/@statsig/client-core/src/$_StatsigGlobal.js"),t),n(r("./node_modules/@statsig/client-core/src/CacheKey.js"),t),n(r("./node_modules/@statsig/client-core/src/ClientInterfaces.js"),t),n(r("./node_modules/@statsig/client-core/src/DataAdapterCore.js"),t),n(r("./node_modules/@statsig/client-core/src/Diagnostics.js"),t),n(r("./node_modules/@statsig/client-core/src/DownloadConfigSpecsResponse.js"),t),n(r("./node_modules/@statsig/client-core/src/ErrorBoundary.js"),t),n(r("./node_modules/@statsig/client-core/src/EvaluationOptions.js"),t),n(r("./node_modules/@statsig/client-core/src/EvaluationTypes.js"),t),n(r("./node_modules/@statsig/client-core/src/Hashing.js"),t),n(r("./node_modules/@statsig/client-core/src/InitializeResponse.js"),t),n(r("./node_modules/@statsig/client-core/src/Log.js"),t),n(r("./node_modules/@statsig/client-core/src/MemoKey.js"),t),n(r("./node_modules/@statsig/client-core/src/NetworkConfig.js"),t),n(r("./node_modules/@statsig/client-core/src/NetworkCore.js"),t),n(r("./node_modules/@statsig/client-core/src/OverrideAdapter.js"),t),n(r("./node_modules/@statsig/client-core/src/ParamStoreTypes.js"),t),n(r("./node_modules/@statsig/client-core/src/SafeJs.js"),t),n(r("./node_modules/@statsig/client-core/src/SDKType.js"),t),n(r("./node_modules/@statsig/client-core/src/SessionID.js"),t),n(r("./node_modules/@statsig/client-core/src/StableID.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigClientBase.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigClientEventEmitter.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigDataAdapter.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigEvent.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigMetadata.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigOptionsCommon.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigPlugin.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigTypeFactories.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigTypes.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigUser.js"),t),n(r("./node_modules/@statsig/client-core/src/StorageProvider.js"),t),n(r("./node_modules/@statsig/client-core/src/TypedJsonParse.js"),t),n(r("./node_modules/@statsig/client-core/src/TypingUtils.js"),t),n(r("./node_modules/@statsig/client-core/src/UrlConfiguration.js"),t),n(r("./node_modules/@statsig/client-core/src/UUID.js"),t),n(r("./node_modules/@statsig/client-core/src/VisibilityObserving.js"),t),n(r("./node_modules/@statsig/client-core/src/StatsigUpdateDetails.js"),t),n(r("./node_modules/@statsig/client-core/src/SDKFlags.js"),t),__STATSIG__=Object.assign(Object.assign({},null!=__STATSIG__?__STATSIG__:{}),{Log:a.Log,SDK_VERSION:l.SDK_VERSION})},"./node_modules/@statsig/js-client/src/EvaluationResponseDeltas.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;let s=r("./node_modules/@statsig/client-core/src/index.js");function n(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){var r;let i=(0,s._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!i)return{hadBadDeltaChecksum:!0};let o=(n((r=Object.assign(Object.assign(Object.assign({},e),i),{feature_gates:Object.assign(Object.assign({},e.feature_gates),i.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),i.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),i.dynamic_configs)})).deleted_gates,r.feature_gates),delete r.deleted_gates,n(r.deleted_configs,r.dynamic_configs),delete r.deleted_configs,n(r.deleted_layers,r.layer_configs),delete r.deleted_layers,r),a=(0,s._DJB2Object)({feature_gates:o.feature_gates,dynamic_configs:o.dynamic_configs,layer_configs:o.layer_configs},2);return a!==i.checksumV2?{hadBadDeltaChecksum:!0,badChecksum:a,badMergedConfigs:o,badFullResponse:i.deltas_full_response}:JSON.stringify(o)}},"./node_modules/@statsig/js-client/src/EvaluationStore.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r("./node_modules/@statsig/client-core/src/index.js");t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,s._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r;if(!e)return!1;let n=(0,s._typedJsonParse)(e.data,"has_updates","EvaluationResponse");return null!=n&&(this._source=e.source,(null==n?void 0:n.has_updates)!==!0||(this._rawValues=e.data,this._lcut=n.time,this._receivedAt=e.receivedAt,this._values=n,this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,n),e.source&&n.user&&this._setWarningState(t,n),s.SDKFlags.setFlags(this._sdkKey,null!==(r=n.sdk_flags)&&void 0!==r?r:{}),!0))}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.feature_gates,e)}getConfig(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.dynamic_configs,e)}getLayer(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.layer_configs,e)}getParamStore(e){var t;return this._getDetailedStoreResult(null===(t=this._values)||void 0===t?void 0:t.param_stores,e)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.exposures}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;let r={};return t.user&&(r.user=t.user),t.sdkInfo&&(r.generatorSDKInfo=t.sdkInfo),r.lcut=t.time,r}_getDetailedStoreResult(e,t){let r=null;return e&&(r=e[t]?e[t]:e[(0,s._DJB2)(t)]),{result:r,details:this._getDetails(null==r)}}_setWarningState(e,t){var r;let n=s.StableID.get(this._sdkKey);if((null===(r=e.customIDs)||void 0===r?void 0:r.stableID)!==n){this._warnings.add("StableIDMismatch");return}if("user"in t){let r=t.user;(0,s._getFullUserHash)(e)!==(0,s._getFullUserHash)(r)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};let e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,r;let s=this.getCurrentSourceDetails(),n=s.reason,i=null!==(t=s.warnings)&&void 0!==t?t:[];"Bootstrap"===this._source&&i.length>0&&(n+=i[0]),"Uninitialized"!==n&&"NoValues"!==n&&(n=`${n}:${e?"Unrecognized":"Recognized"}`);let o="Bootstrap"===this._source&&null!==(r=this._bootstrapMetadata)&&void 0!==r?r:void 0;return o&&(s.bootstrapMetadata=o),Object.assign(Object.assign({},s),{reason:n})}}},"./node_modules/@statsig/js-client/src/Network.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let n=r("./node_modules/@statsig/client-core/src/index.js"),i=r("./node_modules/@statsig/js-client/src/EvaluationResponseDeltas.js");class o extends n.NetworkCore{constructor(e,t){super(e,t);let r=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new n.UrlConfiguration(n.Endpoint._initialize,null==r?void 0:r.initializeUrl,null==r?void 0:r.api,null==r?void 0:r.initializeFallbackUrls)}fetchEvaluations(e,t,r,i,o){var a,l,c,u,d,h;return s(this,void 0,void 0,function*(){let s=t?(0,n._typedJsonParse)(t,"has_updates","InitializeResponse"):null,p={user:i,hash:null!==(c=null===(l=null===(a=this._option)||void 0===a?void 0:a.networkConfig)||void 0===l?void 0:l.initializeHashAlgorithm)&&void 0!==c?c:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==s?void 0:s.has_updates){let e=(null==s?void 0:s.hash_used)!==(null!==(h=null===(d=null===(u=this._option)||void 0===u?void 0:u.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==h?h:"djb2");p=Object.assign(Object.assign({},p),{sinceTime:o&&!e?s.time:0,previousDerivedFields:"derived_fields"in s&&o?s.derived_fields:{},deltasResponseRequested:!0,full_checksum:s.full_checksum})}return this._fetchEvaluations(e,s,p,r)})}_fetchEvaluations(e,t,r,n){var o,a;return s(this,void 0,void 0,function*(){let s=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:n});if((null==s?void 0:s.code)===204)return'{"has_updates": false}';if((null==s?void 0:s.code)!==200)return null!==(o=null==s?void 0:s.body)&&void 0!==o?o:null;if((null==t?void 0:t.has_updates)!==!0||(null===(a=s.body)||void 0===a?void 0:a.includes('"is_delta":true'))!==!0||!0!==r.deltasResponseRequested)return s.body;let l=(0,i._resolveDeltasResponse)(t,s.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),n)})}}t.default=o},"./node_modules/@statsig/js-client/src/ParamStoreGetterFactory.js":(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;let s=r("./node_modules/@statsig/client-core/src/index.js"),n={disableExposureLog:!0};function i(e){return null==e||!1===e.disableExposureLog}function o(e,t){return null!=t&&!(0,s._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(a,l)=>{if(null==t)return l;let c=t[a];if(null==c||null!=l&&(0,s._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return c.value;case"gate":return e.getFeatureGate(c.gate_name,i(r)?void 0:n).value?c.pass_value:c.fail_value;case"dynamic_config":return function(e,t,r,s){let a=e.getDynamicConfig(t.config_name,n).get(t.param_name);return o(a,r)?r:(i(s)&&e.getDynamicConfig(t.config_name),a)}(e,c,l,r);case"experiment":return function(e,t,r,s){let a=e.getExperiment(t.experiment_name,n).get(t.param_name);return o(a,r)?r:(i(s)&&e.getExperiment(t.experiment_name),a)}(e,c,l,r);case"layer":return function(e,t,r,s){let a=e.getLayer(t.layer_name,n).get(t.param_name);return o(a,r)?r:(i(s)&&e.getLayer(t.layer_name).get(t.param_name),a)}(e,c,l,r);default:return l}}}},"./node_modules/@statsig/js-client/src/StatsigClient.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let n=r("./node_modules/@statsig/client-core/src/index.js"),i=r("./node_modules/@statsig/js-client/src/EvaluationStore.js"),o=r("./node_modules/@statsig/js-client/src/Network.js"),a=r("./node_modules/@statsig/js-client/src/ParamStoreGetterFactory.js"),l=r("./node_modules/@statsig/js-client/src/StatsigEvaluationsDataAdapter.js");class c extends n.StatsigClientBase{static instance(e){let t=(0,n._getStatsigGlobal)().instance(e);return t instanceof c?t:(n.Log.warn((0,n._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new c(null!=e?e:"",{}))}constructor(e,t,r=null){var s,a;n.SDKType._setClientType(e,"javascript-client");let c=new o.default(r,e=>{this.$emt(e)});for(let o of(super(e,null!==(s=null==r?void 0:r.dataAdapter)&&void 0!==s?s:new l.StatsigEvaluationsDataAdapter,c,r),this.getFeatureGate=this._memoize(n.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(n.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(n.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getLayer=this._memoize(n.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(n.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new i.default(e),this._network=c,this._user=this._configureUser(t,r),null!==(a=null==r?void 0:r.plugins)&&void 0!==a?a:[]))o.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,n.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(t=this._store.getWarnings())&&void 0!==t?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return s(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(e,t){var r;let s=performance.now(),i=[...null!==(r=this._store.getWarnings())&&void 0!==r?r:[]];this._resetForUser(e);let o=this.dataAdapter.getDataSync(this._user);null==o&&i.push("NoCachedValues"),this._store.setValues(o,this._user),this._finalizeUpdate(o);let a=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===a||null==a&&(null==o?void 0:o.source)==="Bootstrap"||this._runPostUpdate(null!=o?o:null,this._user),(0,n.createUpdateDetails)(!0,this._store.getSource(),performance.now()-s,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),i)}updateUserAsync(e,t){return s(this,void 0,void 0,function*(){this._resetForUser(e);let r=this._user;n.Diagnostics._markInitOverallStart(this._sdkKey);let s=this.dataAdapter.getDataSync(r);if(this._store.setValues(s,this._user),this._setStatus("Loading",s),s=yield this.dataAdapter.getDataAsync(s,r,t),r!==this._user)return(0,n.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let i=!1;null!=s&&(n.Diagnostics._markInitProcessStart(this._sdkKey),i=this._store.setValues(s,this._user),n.Diagnostics._markInitProcessEnd(this._sdkKey,{success:i})),this._finalizeUpdate(s),i||(this._errorBoundary.attachErrorIfNoneExists(n.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),n.Diagnostics._markInitOverallEnd(this._sdkKey,i,this._store.getCurrentSourceDetails());let o=n.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,n.createUpdateDetails)(i,this._store.getSource(),o,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:n.StatsigSession.get(this._sdkKey),stableID:n.StableID.get(this._sdkKey)}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){this._logger.enqueue(Object.assign(Object.assign({},"string"==typeof e?{eventName:e,value:t,metadata:r}:e),{user:this._user,time:Date.now()}))}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(e){return s(this,void 0,void 0,function*(){return n.Storage.isReady()||(yield n.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{n.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var r;let s=(0,n._normalizeUser)(e,t),i=null===(r=s.customIDs)||void 0===r?void 0:r.stableID;return i&&n.StableID.setOverride(i,this._sdkKey),s}_getFeatureGateImpl(e,t){var r,s;let{result:i,details:o}=this._store.getGate(e),a=(0,n._makeFeatureGate)(e,o,i),l=null===(s=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getGateOverride)||void 0===s?void 0:s.call(r,a,this._user,t),c=null!=l?l:a;return this._enqueueExposure(e,(0,n._createGateExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,t){var r,s;let{result:i,details:o}=this._store.getConfig(e),a=(0,n._makeDynamicConfig)(e,o,i),l=null===(s=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getDynamicConfigOverride)||void 0===s?void 0:s.call(r,a,this._user,t),c=null!=l?l:a;return this._enqueueExposure(e,(0,n._createConfigExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,t){var r,s,i,o;let{result:a,details:l}=this._store.getConfig(e),c=(0,n._makeExperiment)(e,l,a);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,n._mapExposures)(null!==(s=null===(r=c.__evaluation)||void 0===r?void 0:r.secondary_exposures)&&void 0!==s?s:[],this._store.getExposureMapping()));let u=null===(o=null===(i=this.overrideAdapter)||void 0===i?void 0:i.getExperimentOverride)||void 0===o?void 0:o.call(i,c,this._user,t),d=null!=u?u:c;return this._enqueueExposure(e,(0,n._createConfigExposure)(this._user,d,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:d}),d}_getLayerImpl(e,t){var r,s,i;let{result:o,details:a}=this._store.getLayer(e),l=(0,n._makeLayer)(e,a,o),c=null===(s=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getLayerOverride)||void 0===s?void 0:s.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let u=(0,n._mergeOverride)(l,c,null!==(i=null==c?void 0:c.__value)&&void 0!==i?i:l.__value,r=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,n._createLayerParameterExposure)(this._user,u,r,this._store.getExposureMapping()),t)});return this.$emt({name:"layer_evaluation",layer:u}),u}_getParameterStoreImpl(e,t){var r,s;let{result:n,details:i}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let o={name:e,details:i,__configuration:n,get:(0,a._makeParamStoreGetter)(this,n,t)},l=null===(s=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getParamStoreOverride)||void 0===s?void 0:s.call(r,o,t);return null!=l&&(o.__configuration=l.config,o.details=l.details,o.get=(0,a._makeParamStoreGetter)(this,l.config,t)),o}}t.default=c},"./node_modules/@statsig/js-client/src/StatsigEvaluationsDataAdapter.js":function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){return new(r||(r=Promise))(function(n,i){function o(e){try{l(s.next(e))}catch(e){i(e)}}function a(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((s=s.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;let n=r("./node_modules/@statsig/client-core/src/index.js"),i=r("./node_modules/@statsig/js-client/src/Network.js");class o extends n.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof i.default?this._network=r:this._network=new i.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,n._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,n._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):n.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(e,t,r,n){var i;return s(this,void 0,void 0,function*(){let s=yield null===(i=this._network)||void 0===i?void 0:i.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,n);return null!=s?s:null})}_getCacheKey(e){var t;let r=(0,n._getStorageKey)(this._getSdkKey(),e,null===(t=this._options)||void 0===t?void 0:t.customUserCacheKeyFunc);return`${n.DataAdapterCachePrefix}.${this._cacheSuffix}.${r}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,n._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=o},"./node_modules/@statsig/js-client/src/index.js":function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,s,n)}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;let i=r("./node_modules/@statsig/js-client/src/StatsigClient.js");t.StatsigClient=i.default,n(r("./node_modules/@statsig/client-core/src/index.js"),t),__STATSIG__=Object.assign(Object.assign({},null!=__STATSIG__?__STATSIG__:{}),{StatsigClient:i.default}),t.default=__STATSIG__},"./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js":(e,t,r)=>{"use strict";function s(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}r.d(t,{A:()=>s})},"./node_modules/date-fns/esm/_lib/requiredArgs/index.js":(e,t,r)=>{"use strict";function s(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}r.d(t,{A:()=>s})},"./node_modules/date-fns/esm/differenceInCalendarDays/index.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var s=r("./node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js"),n=r("./node_modules/date-fns/esm/startOfDay/index.js"),i=r("./node_modules/date-fns/esm/_lib/requiredArgs/index.js");function o(e,t){(0,i.A)(2,arguments);var r=(0,n.A)(e),o=(0,n.A)(t);return Math.round((r.getTime()-(0,s.A)(r)-(o.getTime()-(0,s.A)(o)))/864e5)}},"./node_modules/date-fns/esm/startOfDay/index.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r("./node_modules/date-fns/esm/toDate/index.js"),n=r("./node_modules/date-fns/esm/_lib/requiredArgs/index.js");function i(e){(0,n.A)(1,arguments);var t=(0,s.A)(e);return t.setHours(0,0,0,0),t}},"./node_modules/date-fns/esm/toDate/index.js":(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r("./node_modules/@babel/runtime/helpers/esm/typeof.js"),n=r("./node_modules/date-fns/esm/_lib/requiredArgs/index.js");function i(e){(0,n.A)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,s.A)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}},"./node_modules/decode-uri-component/index.js":e=>{"use strict";var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),s=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=s.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var i=function(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(r)||[],s=1;s{var s=r("./node_modules/process/browser.js");!function(t){var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(){this._events={},this._conf&&i.call(this,this._conf)}function i(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=t!==e.maxListeners?e.maxListeners:10,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=10}function o(e,t){var r="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(r+=" Event name: "+t+"."),void 0!==s&&s.emitWarning){var n=Error(r);n.name="MaxListenersExceededWarning",n.emitter=this,n.count=e,s.emitWarning(n)}else console.error(r),console.trace&&console.trace()}function a(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,i.call(this,e)}function l(e,t,r,s){if(!r)return[];var n,i,o,a,c,u,d,h=[],p=t.length,m=t[s],f=t[s+1];if(s===p&&r._listeners){if("function"==typeof r._listeners)return e&&e.push(r._listeners),[r];for(n=0,i=r._listeners.length;n0&&i._listeners.length>this._maxListeners&&(i._listeners.warned=!0,o.call(this,i._listeners.length,a))):i._listeners=r;break}a=e.shift()}return!0}a.EventEmitter2=a,a.prototype.delimiter=".",a.prototype.setMaxListeners=function(e){t!==e&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},a.prototype.event="",a.prototype.once=function(e,t){return this._once(e,t,!1)},a.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},a.prototype._once=function(e,t,r){return this._many(e,1,t,r),this},a.prototype.many=function(e,t,r){return this._many(e,t,r,!1)},a.prototype.prependMany=function(e,t,r){return this._many(e,t,r,!0)},a.prototype._many=function(e,t,r,s){var n=this;if("function"!=typeof r)throw Error("many only accepts instances of Function");function i(){return 0==--t&&n.off(e,i),r.apply(this,arguments)}return i._origin=r,this._on(e,i,s),n},a.prototype.emit=function(){this._events||n.call(this);var e,t,r,s,i,o=arguments[0];if("newListener"===o&&!this.newListener&&!this._events.newListener)return!1;var a=arguments.length;if(this._all&&this._all.length){if(i=this._all.slice(),a>3)for(s=0,e=Array(a);s3)for(s=1,e=Array(a-1);s3)for(s=1,e=Array(c);s3)for(s=1,e=Array(c-1);s0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,o.call(this,this._events[e].length,e))):this._events[e]=t,this},a.prototype.off=function(e,s){if("function"!=typeof s)throw Error("removeListener only takes instances of Function");var n,i=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();i=l.call(this,null,o,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],i.push({_listeners:n})}for(var a=0;a0&&e(r[i]),0!==Object.keys(o).length||delete r[i])}}}(this.listenerTree),this},a.prototype.offAny=function(e){var t,r=0,s=0;if(e&&this._all&&this._all.length>0){for(r=0,s=(t=this._all).length;r{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((s=t.length)!=r.length)return!1;for(n=s;0!=n--;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(n=s;0!=n--;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=s;0!=n--;){var s,n,i,o=i[n];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},"./node_modules/filter-obj/index.js":e=>{"use strict";e.exports=function(e,t){for(var r={},s=Object.keys(e),n=Array.isArray(t),i=0;i{!function(t){"function"==typeof define&&define.amd&&define(t),e.exports=t()}(function(){function e(){for(var e=0,t={};e{"use strict";r.d(t,{A:()=>i});var s=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function n(e,t){if(e.length!==t.length)return!1;for(var r,n,i=0;i{var t,r,s,n=e.exports={};function i(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var r=1;r{"use strict";let s=r("./node_modules/strict-uri-encode/index.js"),n=r("./node_modules/decode-uri-component/index.js"),i=r("./node_modules/split-on-first/index.js"),o=r("./node_modules/filter-obj/index.js"),a=e=>null==e,l=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?s(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(e):e}function h(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function p(e){let t=(e=h(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function f(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,s)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){s[e]=r;return}void 0===s[e]&&(s[e]={}),s[e][t[1]]=r};case"bracket":return(e,r,s)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){s[e]=r;return}if(void 0===s[e]){s[e]=[r];return}s[e]=[].concat(s[e],r)};case"colon-list-separator":return(e,r,s)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){s[e]=r;return}if(void 0===s[e]){s[e]=[r];return}s[e]=[].concat(s[e],r)};case"comma":case"separator":return(t,r,s)=>{let n="string"==typeof r&&r.includes(e.arrayFormatSeparator),i="string"==typeof r&&!n&&d(r,e).includes(e.arrayFormatSeparator);r=i?d(r,e):r;let o=n||i?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);s[t]=o};case"bracket-separator":return(t,r,s)=>{let n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n){s[t]=r?d(r,e):r;return}let i=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===s[t]){s[t]=i;return}s[t]=[].concat(s[t],i)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),s=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return s;for(let n of e.split("&")){if(""===n)continue;let[e,o]=i(t.decode?n.replace(/\+/g," "):n,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:d(o,t),r(d(e,t),o,s)}for(let e of Object.keys(s)){let r=s[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else s[e]=m(r,t)}return!1===t.sort?s:(!0===t.sort?Object.keys(s).sort():Object.keys(s).sort(t.sort)).reduce((e,t)=>{let r=s[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=p,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&a(e[r])||t.skipEmptyString&&""===e[r],s=function(e){switch(e.arrayFormat){case"index":return t=>(r,s)=>{let n=r.length;return void 0===s||e.skipNull&&null===s||e.skipEmptyString&&""===s?r:null===s?[...r,[u(t,e),"[",n,"]"].join("")]:[...r,[u(t,e),"[",u(n,e),"]=",u(s,e)].join("")]};case"bracket":return t=>(r,s)=>void 0===s||e.skipNull&&null===s||e.skipEmptyString&&""===s?r:null===s?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(s,e)].join("")];case"colon-list-separator":return t=>(r,s)=>void 0===s||e.skipNull&&null===s||e.skipEmptyString&&""===s?r:null===s?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(s,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(s,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?s:(n=null===n?"":n,0===s.length)?[[u(r,e),t,u(n,e)].join("")]:[[s,u(n,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,s)=>void 0===s||e.skipNull&&null===s||e.skipEmptyString&&""===s?r:null===s?[...r,u(t,e)]:[...r,[u(t,e),"=",u(s,e)].join("")]}}(t),n={};for(let t of Object.keys(e))r(t)||(n[t]=e[t]);let i=Object.keys(n);return!1!==t.sort&&i.sort(t.sort),i.map(r=>{let n=e[r];return void 0===n?"":null===n?u(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":n.reduce(s(r),[]).join("&"):u(r,t)+"="+u(n,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,s]=i(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(p(e),t)},t&&t.parseFragmentIdentifier&&s?{fragmentIdentifier:d(s,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[l]:!0},r);let s=h(e.url).split("?")[0]||"",n=t.extract(e.url),i=Object.assign(t.parse(n,{sort:!1}),e.query),o=t.stringify(i,r);o&&(o=`?${o}`);let a=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(a=`#${r[l]?u(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${s}${o}${a}`},t.pick=(e,r,s)=>{s=Object.assign({parseFragmentIdentifier:!0,[l]:!1},s);let{url:n,query:i,fragmentIdentifier:a}=t.parseUrl(e,s);return t.stringifyUrl({url:n,query:o(i,r),fragmentIdentifier:a},s)},t.exclude=(e,r,s)=>{let n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,s)}},"./node_modules/react/cjs/react.production.min.js":(e,t)=>{"use strict";var r=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function y(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||m}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||m}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var _=b.prototype=new v;_.constructor=b,f(_,y.prototype),_.isPureReactComponent=!0;var w=Array.isArray,C=Object.prototype.hasOwnProperty,O={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,s){var n,i={},o=null,a=null;if(null!=t)for(n in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)C.call(t,n)&&!k.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(1===l)i.children=s;else if(1{"use strict";e.exports=r("./node_modules/react/cjs/react.production.min.js")},"./node_modules/split-on-first/index.js":e=>{"use strict";e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},"./node_modules/strict-uri-encode/index.js":e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},"./packages/browser/index.ts":(e,t,r)=>{"use strict";r.d(t,{Pi:()=>G,oJ:()=>d,IO:()=>a,eO:()=>c,fm:()=>F,Z0:()=>I,ft:()=>B,m0:()=>w,zC:()=>K,H8:()=>g,xl:()=>A,F3:()=>f,oi:()=>D,Ab:()=>M,Cr:()=>U,gm:()=>p,mc:()=>R,lT:()=>h,mU:()=>k,N1:()=>O,aR:()=>E,j9:()=>_,cX:()=>b,nr:()=>y,CI:()=>S,uF:()=>v,ME:()=>u,E4:()=>L,SQ:()=>N});var s=r("./packages/config/index.ts");let n="unknown-browser-version",i=(e,t)=>{let{userAgent:r}=t,s=r.indexOf(e);if(-1!==s){let t=r.substring(s+e.length+1);return t.includes(".")?parseFloat(t.split(".").slice(0,2).join(".")):parseInt(t,10)}return n},o=e=>{if(!e.userAgent.includes("CriOS"))return i("Version",e);{let t=e.userAgent.match(/OS ([0-9]+)_[0-9]+(_[0-9]+)? like Mac OS X/);return t?+t[1]:n}},a=((e,t)=>{let{userAgent:r}=e,s=!!t.documentMode,n=r.includes("Edg/"),i=r.includes("Edge"),o=r.includes("Opera")||r.includes("OPR"),a=r.includes("Vivaldi"),l=r.includes("Firefox"),c=r.includes("UCBrowser"),u=r.includes("SamsungBrowser"),d=r.includes("YaBrowser"),h=r.includes("Chrom")&&!n&&!i&&!o&&!d&&!a&&!u&&!c,p=r.includes("CriOS")||r.includes("Safari")&&!h&&!n&&!i&&!o&&!u&&!c&&!a&&!d;switch(!0){case h:return"chrome";case l:return"firefox";case p:return"safari";case n:return"edg";case i:return"edge-legacy";case s:return"explorer";case o:return"opera";case d:return"yandex";case a:return"vivaldi";case c:return"ucbrowser";case u:return"samsung";default:return"unknown-browser"}})(navigator,document),l=((e,t)=>{switch(e){case"chrome":{let e=i("Chrome",t);return e!==n?e:i("CriOS",t)}case"firefox":return i("Firefox",t);case"safari":return o(t);case"edg":return i("Edg",t);case"edge-legacy":return i("Edge",t);case"opera":return i("OPR",t);case"explorer":{let e=i("MSIE",t);return e!==n?e:i("rv",t)}case"yandex":return i("YaBrowser",t);case"vivaldi":return i("Vivaldi",t);case"samsung":return i("SamsungBrowser",t);case"ucbrowser":return i("UCBrowser",t);default:return n}})(a,navigator),c=`${a}-${l}`,u=(e=>{let{userAgent:t,platform:r}=e,s=r.includes("Win"),n=r.includes("Mac"),i=r.includes("Linux"),o=t.includes("Android"),a=t.includes("iPad"),l=t.includes("iPod"),c=t.includes("iPhone");switch(!0){case s:return"windows";case n:return"mac";case a:return"ipad";case l:return"ipod";case c:return"iphone";case o:return"android";case i:return"linux";default:return"unknown-os"}})(navigator),d=`${a} ${c} ${u}`,h=()=>"explorer"===a,p=()=>"firefox"===a,m=()=>"edg"===a,f=()=>"edge-legacy"===a,g=()=>"chrome"===a,y=()=>"safari"===a,v=()=>"windows"===u,b=()=>"mac"===u,_=()=>"linux"===u,w=()=>"android"===u,C=()=>"ipad"===u,O=()=>"ipod"===u,k=()=>"iphone"===u,E=()=>C()||k()||O(),S=()=>C()||k()||O()||w(),A=()=>s.R0===s.l0.Desktop,I=()=>navigator.language||navigator.browserLanguage||"unknown";var j=r("./node_modules/memoize-one/dist/memoize-one.esm.js"),x=r("./packages/cookies/src/cookies.ts");let T=(0,j.A)(e=>"true"===x.W.get("force_atlassian_embeddedDocument")),P=(0,j.A)(e=>"true"===x.W.get("force_embeddedDocument")||T(e));function D(){return P(document.cookie)||window.top!==window.self}let R=()=>window.devicePixelRatio>1,L=()=>g()||p()||m(),N=()=>g()||p()||y(),U=()=>{if(!D())return!1;let e=new URLSearchParams(window.location.search);return e.has("iframeSource")&&"msteams"===e.get("iframeSource")},M=()=>{if(T(document.cookie))return!0;if(!D())return!1;let e=new URLSearchParams(window.location.search);return e.has("iframeSource")&&"atlassian-smart-link"===e.get("iframeSource")},F=()=>A()||U()||M();function B(){return"ResizeObserver"in window}let V={chrome:125,firefox:115,edg:125,safari:16,opera:109,vivaldi:3};function K(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;return t!==n&&!!Object.prototype.hasOwnProperty.call(V,e)&&t>=V[e]}class G{disconnect(){}observe(){}unobserve(){}}},"./packages/config/index.ts":(e,t,r)=>{"use strict";r.d(t,{l0:()=>s,$8:()=>M,qV:()=>D,ad:()=>R,fg:()=>P,R0:()=>i,Nc:()=>L,Jr:()=>et,Xj:()=>_,R4:()=>w,Pf:()=>en,PI:()=>b,ac:()=>I,Sn:()=>Z,Ov:()=>ee,JR:()=>m,$B:()=>a,CT:()=>o,cZ:()=>A,vT:()=>z,iD:()=>H,cA:()=>N,lk:()=>f,A5:()=>G,kO:()=>$,Gw:()=>k,_Y:()=>E,dq:()=>S,oO:()=>x,k5:()=>Q,pH:()=>T,tp:()=>c,l$:()=>u,Jt:()=>U,jg:()=>h,So:()=>Y,Mf:()=>F,qT:()=>y,Hg:()=>er,Qq:()=>C,Eu:()=>v,qX:()=>V,U$:()=>K,Zz:()=>O,kJ:()=>J,Q7:()=>g,tx:()=>B,Yq:()=>W,mx:()=>es,rX:()=>d,xZ:()=>j,mW:()=>p,w0:()=>q});let s={Desktop:"desktop"},n=window.init_config||{},i=n.appId||null,o=n.dontDismissNotifications||null;n.limitMemoryUsage;let a=n.desktopVersion||"0";function l(e,t,r){var s;return(t="symbol"==typeof(s=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?s:s+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let c="chlg06CfblVj204fihGEqA",u="env-8",d="https://trello-slack.services.atlassian.com",h=!1,p="https://p.trellocdn.com",m="56d5e249a98895a9797bebb9",f="5a999cd36066c584c097f193",g="5f4ff6881ce8e97c81d2f605",y="5c2462c384ab8949b1724a20",v="5ad892c30b141641d32919bf",b="588a331cc86ffbe08f5d2c67",_="https://trello-attachments.s3.amazonaws.com",w="https://trello-backgrounds.s3.amazonaws.com",C="https://trello-logos.s3.amazonaws.com",O="f7936f71-2186-4c33-8553-134e287aefdf",k="330642982326-o2b8p0glj3m1o0sgllrpas2m8j9hjn7i.apps.googleusercontent.com",E="AIzaSyAvSBSs9sIV0S5wf4ivvDrwYp6Q20e7jGE",S="122616814543-k4q6th338f4j05dkv1qgvcbutlpa0voe.apps.googleusercontent.com",A="36ipz29apw2svq8",I="zclwcvudmddhz0cscz3w6awtcfs8bne3",j="pk_live_51IaUVrBgOoA7vC4WlHhHNjTeOOqbF7d56Ge0Vvju0qbrBJGLdBmpeGQntGWaCgVKPk3c2itZOuTuFjcxmMyC6g4m00DL5aSU1K",x="AIzaSyBGuM0ku7LVKH0l45qQsvvUnG2H2jUX0GU",T="AIzaSyDzX-u_bGY7tHhhyNaqm_vz8aY_zbYKoBE",P="PROD",D="trello.com/gateway/api/gasv3/api/v1",R="https",L="1f24403e-f053-43de-b063-e20b357a8f63",N="prod",U="https://id.atlassian.com",M="https://admin.atlassian.com",F="https://janus.prod.atl-paas.net",B="https://1609e814bfa14a3db09f984e6426cfd3@o55978.ingest.sentry.io/5988847",V="6052d130068a8c0de7b022b4",K="https://appsource.microsoft.com/en-us/product/office/WA200002592?tab=Overview",G="6052d16c340ed23e9da083ed",$="https://workspace.google.com/marketplace/app/trello_for_gmail/710372432947",z="6052d0bb1b3c162630f54230",W=!0,q="https://trello-server.us-east-1.prod.atl-paas.net",H="inbox@app.trello.com",J="8f9e7052-1437-463f-ae39-e3db0930a4a5",Q="789b4470aea82312",Y=!1,X=window?.trelloVersion??"dev-0",Z=new class{constructor(e){l(this,"head",void 0),l(this,"patch",0),l(this,"version",void 0);let t=e.split("-");this.head=t.slice(0,-1).join("-"),this.version=parseFloat(t.slice(-1)[0])}toString(){return`${this.head}-${this.fullVersion()}`}toJSON(){return this.toString()}fullVersion(){return[this.version,this.patch].filter(e=>e).join(".")||0}}(X),ee=Z.toString(),et=["538627f73cbb44d1bfbb58f0","58adea146fcdb5f4e50bebf2"],er=window.locale||"en",es=location.origin||/^[^/]+?[/]{2}[^/]+/.exec(location.href)[0],en=window.__bifrost_track__},"./packages/cookies/src/cookies.ts":(e,t,r)=>{"use strict";r.d(t,{W:()=>c});var s=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/initialize-controls/index.js"),n=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/set-strictly-necessary-cookie/index.js"),i=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/set-cookie/index.js"),o=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/get-cookie/index.js"),a=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/cookie-controls/delete-cookie/index.js"),l=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/controllers/third-party-controls/check-third-party/index.js");class c{static initialize(){(0,s.bX)({product:"Trello"})}static async set(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"use_preferences";return"necessary"===s?((0,n.G)(e,t,r),Promise.resolve(!0)):await (0,i.T)(e,t,r)==="SUCCESS"}static get(e){return e?(0,o.R)(e):(0,o.R)()}static remove(e,t){(0,a.Y)(e,t)}static async checkThirdParty(e,t,r){await (0,l.W)(e,t,r)}}},"./packages/developer-console-state/index.ts":(e,t,r)=>{"use strict";r.d(t,{t:()=>s});let s=new(r("./packages/shared-state/index.ts")).oQ({lastActiveTab:0,developerConsoleOpen:!1,developerConsoleEnabled:!1,plainTextEditor:!1,showModelIds:!1,useTrelloTimingHeader:!1,logConnectionInformation:void 0,operationNameInUrl:void 0},{storageKey:"developerConsoleState"})},"./packages/dynamic-config/src/data/dynamicConfigFlags.ts":(e,t,r)=>{"use strict";r.d(t,{l:()=>s});let s={butler_ent_admin_only_allowlist:{createdOn:"2024-11-18",defaultValue:[""],owner:"ssilber"},mirror_cards_ent_blocklist:{createdOn:"2025-01-23",defaultValue:["55c389e4e94b6c5acb767b23"],owner:"slondon"},trello_enterprise_planner_blocklist:{createdOn:"2025-05-09",defaultValue:[""],owner:"jlei"},trello_web_apollo_cache_hydrator_metrics:{createdOn:"2024-11-20",defaultValue:!1,owner:"koduche"},trello_web_apollo_read_write_metrics:{createdOn:"2024-11-18",defaultValue:!1,owner:"cilleyd"},trello_web_atlassian_team:{createdOn:"2024-11-13",defaultValue:!1,owner:"mfaith"},trello_web_billing_down_for_maintenance:{createdOn:"2024-11-08",defaultValue:!1,owner:"jmatthews"},trello_web_disconnect_active_clients:{createdOn:"2024-11-07",defaultValue:!1,owner:"mfaith"},trello_web_error_handling_rrs:{createdOn:"2024-11-20",defaultValue:!1,owner:"dcilley"},trello_web_forcefully_reload_to_exact_version:{createdOn:"2024-11-18",defaultValue:0,owner:"mfaith"},trello_web_google_tag_manager:{createdOn:"2024-11-04",defaultValue:!0,owner:"mfaith"},trello_web_inbox_native_graphql_provisioning:{createdOn:"2025-02-11",defaultValue:!1,owner:"greznicov"},trello_web_max_first_active_delay:{createdOn:"2024-11-20",defaultValue:2e3,owner:"mfaith"},trello_web_max_first_idle_delay:{createdOn:"2024-11-20",defaultValue:6e4,owner:"mfaith"},trello_web_mirror_cards_quickload:{createdOn:"2025-04-23",defaultValue:!1,owner:"jsaussy"},trello_web_native_current_board_info:{createdOn:"2024-11-20",defaultValue:!0,owner:"koduche"},trello_web_passively_reload_to_minimum_version:{createdOn:"2024-11-18",defaultValue:0,owner:"mfaith"},trello_web_somethings_wrong:{createdOn:"2024-11-07",defaultValue:!1,owner:"mfaith"},trello_web_take_trello_offline:{createdOn:"2024-11-07",defaultValue:!1,owner:"mfaith"},trello_web_update_nudge_time_interval:{createdOn:"2025-05-22",defaultValue:6048e5,owner:"mellis"}}},"./packages/dynamic-config/src/dynamicConfig.constants.ts":(e,t,r)=>{"use strict";r.d(t,{KK:()=>i,Wu:()=>o,e_:()=>n,iD:()=>s});let s=864e5,n="dynamicConfigUserData",i="dynamicConfigClient",o="dynamicConfigOverrides"},"./packages/id-cache/index.ts":(e,t,r)=>{"use strict";r.d(t,{ij:()=>n,qv:()=>p,g$:()=>m,x2:()=>o});let s=RegExp("^[a-f0-9]*$");function n(e){return(null!=e?e.constructor.name:void 0)==="ObjectID"||(null!=e?e.length:void 0)===24&&s.test(e)}let i=RegExp("ari:cloud:trello::[^/]+/(.+/)?[a-z0-9]{24}$");function o(e){return"string"==typeof e&&/^[a-zA-Z0-9]{8}$/.test(e)}function a(e,t,r){var s;return(t="symbol"==typeof(s=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?s:s+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let l={Card:{isValid:o,getErrorMsg:e=>`Invalid card shortLink: ${e}`},Board:{isValid:o,getErrorMsg:e=>`Invalid board shortLink: ${e}`},Member:{isValid:e=>!0,getErrorMsg:e=>`Invalid member username: ${e}`},Workspace:{isValid:e=>!0,getErrorMsg:e=>`Invalid workspace name: ${e}`}},c={ari:{isValid:function(e){return i.test(e)},getErrorMsg:(e,t)=>`Invalid ${t} ARI: ${e}`},id:{isValid:n,getErrorMsg:(e,t)=>`Invalid ${t} id: ${e}`}},u=()=>({Card:{},Board:{},Member:{},Workspace:{}});var d=new WeakSet;function h(e){return Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})}let p=new class{constructor(){!function(e,t){(function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,d),a(this,"idMap",u()),a(this,"ariMap",u())}reset(){this.idMap=u(),this.ariMap=u()}getId(e,t){if(l[e].isValid(t))return this.idMap[e][t]}setId(e,t,r){if(!c.id.isValid(r))throw Error(c.id.getErrorMsg(r,e));if(!l[e].isValid(t))throw Error(l[e].getErrorMsg(t));this.idMap[e][t]=r}getAri(e,t){if(l[e].isValid(t))return this.ariMap[e][t]}setAri(e,t,r){if(!c.ari.isValid(r))throw Error(c.ari.getErrorMsg(r,e));if(!l[e].isValid(t))throw Error(l[e].getErrorMsg(t));this.ariMap[e][t]=r}setCardId(e,t){return this.setId("Card",e,t)}setBoardId(e,t){return this.setId("Board",e,t)}setMemberId(e,t){return this.setId("Member",e,t)}setWorkspaceId(e,t){return this.setId("Workspace",e,t)}getCardId(e){return this.getId("Card",e)}getBoardId(e){return this.getId("Board",e)}getMemberId(e){return this.getId("Member",e)}getWorkspaceId(e){return this.getId("Workspace",e)}setCardAri(e,t){return this.setAri("Card",e,t)}setBoardAri(e,t){return this.setAri("Board",e,t)}setMemberAri(e,t){return this.setAri("Member",e,t)}setWorkspaceAri(e,t){return this.setAri("Workspace",e,t)}getCardAri(e){return this.getAri("Card",e)}getBoardAri(e){return this.getAri("Board",e)}getMemberAri(e){return this.getAri("Member",e)}getWorkspaceAri(e){return this.getAri("Workspace",e)}__getBoardShortLinkById__DO_NOT_USE(e){if(n(e))return(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")})(d,this,h).call(this,this.idMap.Board)[e]}};function m(e){return/^[0-9]{1,8}$/.test(e.toString())}},"./packages/invitation-tokens/src/getInvitationTokens.ts":(e,t,r)=>{"use strict";r.d(t,{Q:()=>s});let s=()=>{let e;let t=[],r=/invite-token-[-a-f0-9]*=([^;]+)/g;for(;e=r.exec(document.cookie)?.[1];)t.push(unescape(e));if(t.length>0)return t.join(",")}},"./packages/objects/index.ts":(e,t,r)=>{"use strict";r.d(t,{X3:()=>i,bD:()=>n,CN:()=>o,Qd:()=>a});var s=r("./node_modules/fast-deep-equal/index.js");let n=r.n(s)();function i(e,t){let r=Object.keys(e).reduce((e,r)=>(e[r]=t[r],e),{});return n(e,r)}let o=e=>e;function a(e){return!!e&&"object"==typeof e&&[null,Object.prototype].includes(Object.getPrototypeOf(e))}},"./packages/quickload/src/cleanPreload.ts":(e,t,r)=>{"use strict";r.d(t,{l:()=>s});let s=e=>({isLoading:e.isLoading,start:e.start,used:e.used,url:e.url})},"./packages/quickload/src/formatUrl.ts":(e,t,r)=>{"use strict";r.d(t,{J:()=>n});var s=r("./packages/invitation-tokens/src/getInvitationTokens.ts");let n=(e,t)=>{let{rootId:r,idModel:n}=t,i=e.replace(r,n),o=window?.document?.cookie;if(RegExp("^/1/search").test(e)){let e=/dsc=([^;]+)/.exec(o)?.[1];i+=`&dsc=${e??"undefined"}`}let a=(0,s.Q)(),l=i.includes("?");return i+(a?`${l?"&":"?"}invitationTokens=${a}`:"")}},"./packages/quickload/src/getPreloadsFromPath.ts":(e,t,r)=>{"use strict";r.d(t,{m:()=>p});var s=r("./packages/storage/index.ts"),n=r("./packages/dynamic-config/src/data/dynamicConfigFlags.ts"),i=r("./packages/dynamic-config/src/dynamicConfig.constants.ts");let o=["trello_web_native_current_board_info"],a={},l=e=>{let t=JSON.parse((s._q.get(i.KK)??{}).config??"{}"),r=s._q.get(i.Wu)||{},l=t[e]?.value,c=r[e],u=n.l[e].defaultValue,d=c??l??u;return o.includes(e)?(void 0===a[e]&&(a[e]=d),a[e]):d};var c=r("./packages/id-cache/index.ts"),u=r("./packages/quickload/src/formatUrl.ts");let d={header:{taskName:null,requests:[{url:"/1/member/:idMember?fields=id%2CaaBlockSyncUntil%2CaaEmail%2CaaId%2CactivityBlocked%2CavatarHash%2CavatarUrl%2Cbio%2CbioData%2Cconfirmed%2CcredentialsRemovedCount%2CdomainClaimed%2Cemail%2CfullName%2ChasEnterpriseDomain%2CidBoards%2CidEnterprise%2CidEnterprisesAdmin%2CidEnterprisesDeactivated%2CidEnterprisesImplicitAdmin%2CidMemberReferrer%2CidOrganizations%2CidPremOrgsAdmin%2Cinitials%2CisAaMastered%2CixUpdate%2Climits%2CloginTypes%2CmarketingOptIn%2CmemberType%2CmessagesDismissed%2CnodeId%2CnonPublic%2CnonPublicAvailable%2ConeTimeMessagesDismissed%2Cprefs%2CpremiumFeatures%2Cproducts%2CrequiresAaOnboarding%2CsessionType%2Cstatus%2Ctrophies%2Curl%2Cusername&campaigns=true&cohorts=true&enterpriseLicenses=true&enterprises=true&enterprise_filter=saml%2Cmember%2Cmember-unconfirmed%2Cowned&enterprise_fields=id%2CdisplayName%2CidAdmins%2ClogoUrl%2Cname%2Coffering%2CorganizationPrefs%2Cprefs%2Csandbox%2CsandboxExpiry&enterpriseWithRequiredConversion=true&logins=true&organizations=all&organization_fields=id%2CcreationMethod%2CdisplayName%2CenterpriseJoinRequest%2CidEnterprise%2CidEntitlement%2CjwmLink%2ClogoHash%2Cname%2Coffering%2CpremiumFeatures%2Cproducts%2Ctype&organization_enterprise=true&organization_paidAccount=true&organization_paidAccount_fields=billingDates%2CcanRenew%2CcardLast4%2CcardType%2CcontactEmail%2CcontactFullName%2CcontactLocale%2Ccountry%2CdateFirstSubscription%2CdatePendingDisabled%2CexpirationDates%2CinvoiceDetails%2CisVatRegistered%2CixSubscriber%2CneedsCreditCardUpdate%2CpaidProduct%2CpreviousSubscription%2CproductOverride%2Cproducts%2CscheduledChange%2Cstanding%2CstateTaxId%2CtaxId%2CtrialExpiration%2CtrialType%2Czip&pluginData=true&savedSearches=true",rootId:":idMember",operationName:"quickload:MemberHeader",modelName:"Member"},{url:"/1/member/:idMember?fields=id&boards=open%2Cstarred&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2Cname%2CnodeId%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Cstarred%2Csubscribed%2Curl&board_memberships=me&boardStars=true&organizations=all&organization_fields=id%2Ccredits%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts",rootId:":idMember",operationName:"quickload:MemberBoards",modelName:"Member"}]},"^/b/([^/]+)":{taskName:"view-board",requests:[{url:"/1/board/:idBoard?fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2Cdesc%2CdescData%2CenterpriseOwned%2CidEnterprise%2CidMemberCreator%2CidOrganization%2CidTags%2ClabelNames%2Climits%2Cmemberships%2Cname%2CnodeId%2CpowerUps%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Csubscribed%2CtemplateGallery%2Ctype%2Curl&organization_disable_mock=true&boardPlugins=true&customFields=true&enterprise=true&enterprise_fields=id%2CaiPrefs%2CdisplayName&labels=all&label_fields=id%2Ccolor%2CidBoard%2Cname&labels_limit=1000&members=all&member_fields=id%2CactivityBlocked%2CavatarUrl%2Cbio%2CbioData%2Cconfirmed%2CfullName%2CidEnterprise%2CidMemberReferrer%2CidPremOrgsAdmin%2Cinitials%2CmemberType%2CnonPublic%2CnonPublicAvailable%2Curl%2Cusername&memberships_orgMemberType=true&myPrefs=true&organization=true&organization_fields=id%2Cdesc%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cmemberships%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts%2Curl%2Cwebsite&organization_enterprise=true&organization_memberships=all&organization_pluginData=true&organization_tags=true&pluginData=true",rootId:":idBoard",operationName:"quickload:CurrentBoardInfo",modelName:"Board"},{url:"/1/board/:idBoard?fields=id&cards=visible&card_fields=id%2Caddress%2Cbadges%2CcardRole%2Cclosed%2Ccoordinates%2Ccover%2CcreationMethod%2CcreationMethodError%2CcreationMethodLoadingStartedAt%2CdateLastActivity%2Cdesc%2CdescData%2Cdue%2CdueComplete%2CdueReminder%2CidAttachmentCover%2CidBoard%2CidLabels%2CidList%2CidMembers%2CidShort%2CisTemplate%2Clabels%2Climits%2ClocationName%2CmirrorSourceId%2Cname%2CnodeId%2Cpinned%2Cpos%2CshortLink%2CshortUrl%2Cstart%2Csubscribed%2Curl&card_attachments=true&card_attachment_fields=id%2Cbytes%2Cdate%2CedgeColor%2CfileName%2CidMember%2CisMalicious%2CisUpload%2CmimeType%2Cname%2Cpos%2Curl&card_checklists=all&card_checklist_fields=id%2CidBoard%2CidCard%2Cname%2Cpos&card_checklist_checkItems=none&card_customFieldItems=true&card_pluginData=true&card_stickers=true&lists=open&list_fields=id%2Cclosed%2Ccolor%2CcreationMethod%2Cdatasource%2CidBoard%2Climits%2Cname%2CnodeId%2Cpos%2CsoftLimit%2Csubscribed%2Ctype",rootId:":idBoard",operationName:"quickload:CurrentBoardListsCards",modelName:"Board"},{url:"/gateway/api/graphql",rootId:":idBoard",operationName:"quickload:TrelloCurrentBoardInfo",modelName:"TrelloBoard",dynamicConfig:{key:"trello_web_native_current_board_info",value:!0},graphQLPayload:{query:'query TrelloCurrentBoardInfo($id:TrelloShortLink!){trello{boardByShortLink(shortLink:$id)@optIn(to:"TrelloBoard"){id __typename closed creationMethod creator{id __typename objectId}customFields{__typename edges{node{__typename display{__typename cardFront}name objectId options{__typename color objectId position value{__typename text}}position type}}}description{__typename text}enterprise{id __typename displayName objectId}enterpriseOwned galleryInfo{id __typename avatarShape avatarUrl blurb byline category{__typename key}featured language{__typename description enabled language locale localizedDescription}precedence stats{__typename copyCount viewCount}}labels(first:-1){__typename edges{node{id __typename color name objectId}}}lastActivityAt limits{__typename attachments{__typename perBoard{__typename disableAt status warnAt}perCard{__typename disableAt status warnAt}}boards{__typename totalMembersPerBoard{__typename disableAt status warnAt}}cards{__typename openPerBoard{__typename disableAt status warnAt}openPerList{__typename disableAt status warnAt}totalPerBoard{__typename disableAt status warnAt}totalPerList{__typename disableAt status warnAt}}checkItems{__typename perChecklist{__typename disableAt status warnAt}}checklists{__typename perBoard{__typename disableAt status warnAt}perCard{__typename disableAt status warnAt}}customFieldOptions{__typename perField{__typename disableAt status warnAt}}customFields{__typename perBoard{__typename disableAt status warnAt}}labels{__typename perBoard{__typename disableAt status warnAt}}lists{__typename openPerBoard{__typename disableAt status warnAt}totalPerBoard{__typename disableAt status warnAt}}reactions{__typename perAction{__typename disableAt status warnAt}uniquePerAction{__typename disableAt status warnAt}}stickers{__typename perCard{__typename disableAt status warnAt}}}members(first:-1){__typename edges{__typename membership{__typename deactivated objectId type unconfirmed workspaceMemberType}node{id __typename activityBlocked avatarUrl bio bioData confirmed enterprise{id __typename objectId}fullName initials nonPublicData{__typename avatarUrl fullName initials}objectId url username}}}name objectId powerUpData(first:-1){__typename edges{node{__typename access objectId powerUp{objectId}scope value}}}powerUps(filter:{access:"enabled"},first:-1){edges{__typename node{__typename objectId}objectId}}prefs{__typename background{__typename bottomColor brightness color image imageScaled{height url width}tile topColor}calendarFeedEnabled canInvite cardAging cardCovers comments hiddenPowerUpBoardButtons{__typename objectId}hideVotes invitations isTemplate permissionLevel selfJoin showCompleteStatus switcherViews{__typename enabled viewType}voting}premiumFeatures shortLink shortUrl tags(first:-1){__typename edges{node{__typename objectId}}}url viewer{__typename calendarKey email{__typename key list{id __typename objectId}position}lastSeenAt sidebar{__typename show}subscribed}workspace{id __typename description displayName enterprise{id __typename displayName objectId}limits{__typename freeBoards{__typename disableAt status warnAt}freeCollaborators{__typename disableAt status warnAt}totalMembers{__typename disableAt status warnAt}}logoHash members(first:-1){__typename edges{__typename membership{__typename deactivated objectId type unconfirmed}node{id __typename objectId}}}name objectId offering prefs{__typename associatedDomain attachmentRestrictions boardDeleteRestrict{__typename enterprise org private public}boardInviteRestrict boardVisibilityRestrict{__typename enterprise org private public}externalMembersDisabled orgInviteRestrict permissionLevel}tags(first:-1){__typename edges{node{__typename name objectId}}}url website}}}}',variables:{id:":idBoard"},operationName:"TrelloCurrentBoardInfo"}},{url:"/gateway/api/graphql",rootId:":idBoard",operationName:"quickload:TrelloBoardMirrorCards",modelName:"TrelloBoard",dynamicConfig:{key:"trello_web_mirror_cards_quickload",value:!0},graphQLPayload:{query:'query TrelloBoardMirrorCards($id:TrelloShortLink!){trello{boardMirrorCardInfo(shortLink:$id)@optIn(to:"TrelloBoardMirrorCardInfo"){id __typename mirrorCards{__typename edges{__typename node{id __typename mirrorCard{id __typename}sourceBoard{id __typename closed customFields{__typename edges{__typename node{__typename display{__typename cardFront}name objectId options{__typename color objectId position value{__typename text}}position type}}}enterprise{id __typename objectId}labels(first:-1){__typename edges{__typename node{id __typename color name objectId}}}name objectId powerUps{edges{__typename node{__typename objectId}objectId}}prefs{background{brightness color image imageScaled{height url width}topColor}cardAging cardCovers showCompleteStatus}shortLink url workspace{id objectId}}sourceCard{id __typename attachments(first:-1){edges{node{id __typename isMalicious objectId}}}badges{__typename attachments attachmentsByType{__typename trello{__typename board card}}checkItems checkItemsChecked checkItemsEarliestDue comments description due{__typename at complete}externalSource lastUpdatedByAi location maliciousAttachments startedAt viewer{__typename subscribed voted}votes}checklists(first:-1){edges{__typename node{__typename objectId}}}closed complete cover{__typename attachment{id __typename objectId}brightness color edgeColor powerUp{__typename objectId}previews{__typename edges{__typename node{__typename bytes height objectId scaled url width}}}size uploadedBackground{__typename objectId}}creation{__typename loadingStartedAt method}customFieldItems(first:-1){__typename edges{__typename node{__typename customField{__typename objectId}model{id __typename objectId}objectId value{id __typename checked date number objectId text}}}}description{__typename text}due{__typename at complete reminder}isTemplate labels(first:-1){edges{__typename node{id __typename color name objectId}}}lastActivityAt limits{__typename stickers{__typename perCard{__typename disableAt}}}list@optIn(to:"TrelloListBoard"){id __typename closed name objectId position softLimit}location{__typename address coordinates{__typename latitude longitude}name staticMapUrl}members(first:-1){edges{__typename node{id __typename avatarUrl fullName initials nonPublicData{__typename avatarUrl fullName initials}objectId username}}}mirrorSourceId mirrorSourceNodeId name objectId pinned powerUpData{__typename edges{__typename node{__typename objectId powerUp{__typename objectId}value}}}role shortId shortLink stickers(first:-1){__typename edges{__typename node{__typename image imageScaled{__typename height objectId scaled url width}left objectId rotate top url zIndex}}}url}}}}}}}',variables:{id:":idBoard"},operationName:"TrelloBoardMirrorCards"}}]},"^//([^/]*([^/]+))$":{taskName:null,requests:[{url:"/1/member/:idMember?fields=id&boards=open%2Cstarred&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boardStars=true",rootId:":idMember",operationName:"quickload:MemberQuickBoards",modelName:"Member"},{url:"/1/search?query=:searchTerm&partial=true&modelTypes=boards&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl",rootId:":searchTerm",operationName:"quickload:QuickBoardsSearch",modelName:"Search"}]},"^/search":{taskName:null,requests:[{url:"/1/member/:idMember?fields=id&boards=open%2Cstarred&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boardStars=true",rootId:":idMember",operationName:"quickload:MemberQuickBoards",modelName:"Member"}]},"^//$":{taskName:null,requests:[{url:"/1/member/:idMember?fields=id&boards=open%2Cstarred&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boardStars=true",rootId:":idMember",operationName:"quickload:MemberQuickBoards",modelName:"Member"}]},"^/c/([^/]+)":{taskName:"view-board",requests:[{url:"/1/card/:idCard?fields=id%2Cbadges%2CcardRole%2Cclosed%2Ccover%2CcreationMethod%2CcreationMethodError%2CcreationMethodLoadingStartedAt%2CdateClosed%2CdateLastActivity%2Cdesc%2CdescData%2Cdue%2CdueComplete%2CdueReminder%2Cemail%2CidAttachmentCover%2CidBoard%2CidChecklists%2CidLabels%2CidList%2CidMemberCreator%2CidMembers%2CidMembersVoted%2CidShort%2CisTemplate%2Clabels%2Climits%2CmanualCoverAttachment%2CmirrorSourceId%2Cname%2Cpinned%2Cpos%2CshortLink%2CshortUrl%2Cstart%2Csubscribed%2Curl&attachments=true&attachment_fields=id%2Cbytes%2Cdate%2CedgeColor%2CfileName%2CidMember%2CisMalicious%2CisUpload%2CmimeType%2Cname%2Cpos%2Cpreviews%2Curl&customFieldItems=true&pluginData=true&stickers=true&sticker_fields=id%2Cimage%2CimageScaled%2CimageUrl%2Cleft%2Crotate%2Ctop%2CzIndex",rootId:":idCard",operationName:"quickload:PreloadCard",modelName:"Card"}],deferredPreloads:["CurrentBoardInfo","CurrentBoardListsCards"]},"^/w/([^/]+)/billing$":{taskName:null,requests:[{url:"/1/organization/:idOrganization?fields=id%2Ccredits%2CdisplayName%2CidEnterprise%2Cmemberships%2Cname%2Coffering%2Cprefs%2Cproducts%2Ctype&enterprise=true&memberships=active",rootId:":idOrganization",operationName:"quickload:OrganizationBillingPage",modelName:"Organization"}]},"^/([^/]+)/billing$":{taskName:null,requests:[{url:"/1/organization/:idOrganization?fields=id%2Ccredits%2CdisplayName%2CidEnterprise%2Cmemberships%2Cname%2Coffering%2Cprefs%2Cproducts%2Ctype&enterprise=true&memberships=active",rootId:":idOrganization",operationName:"quickload:OrganizationBillingPage",modelName:"Organization"}]},"^/w/(?!search)(?!welcome-to-trello)(?!blank)(?!shortcuts)(?!templates)(?!redeem)([^/]+)$":{taskName:null,requests:[{url:"/1/organization/:idOrganization?fields=id%2CbillableCollaboratorCount%2Ccredits%2Cdesc%2CdescData%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cmemberships%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts%2Ctype%2Cwebsite&boards=open&boards_count=29&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2CidTags%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boards_sortBy=dateLastActivity&boards_sortOrder=desc&enterprise=true&memberships=active&paidAccount=true&paidAccount_fields=billingDates%2CcanRenew%2CcardLast4%2CcardType%2CcontactEmail%2CcontactFullName%2CcontactLocale%2Ccountry%2CdateFirstSubscription%2CexpirationDates%2CinvoiceDetails%2CisVatRegistered%2CixSubscriber%2CneedsCreditCardUpdate%2CpaidProduct%2CpreviousSubscription%2CproductOverride%2Cproducts%2CscheduledChange%2Cstanding%2CstateTaxId%2CtaxId%2CtrialExpiration%2CtrialType%2Czip&tags=true",rootId:":idOrganization",operationName:"quickload:WorkspaceBoardsPageMinimal",modelName:"Organization"}]},"^/(?!search)(?!welcome-to-trello)(?!blank)(?!shortcuts)(?!templates)(?!redeem)([^/]+)$":{taskName:null,requests:[{url:"/1/organization/:idOrganization?fields=id%2CbillableCollaboratorCount%2Ccredits%2Cdesc%2CdescData%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cmemberships%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts%2Ctype%2Cwebsite&boards=open&boards_count=29&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2CidTags%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boards_sortBy=dateLastActivity&boards_sortOrder=desc&enterprise=true&memberships=active&paidAccount=true&paidAccount_fields=billingDates%2CcanRenew%2CcardLast4%2CcardType%2CcontactEmail%2CcontactFullName%2CcontactLocale%2Ccountry%2CdateFirstSubscription%2CexpirationDates%2CinvoiceDetails%2CisVatRegistered%2CixSubscriber%2CneedsCreditCardUpdate%2CpaidProduct%2CpreviousSubscription%2CproductOverride%2Cproducts%2CscheduledChange%2Cstanding%2CstateTaxId%2CtaxId%2CtrialExpiration%2CtrialType%2Czip&tags=true",rootId:":idOrganization",operationName:"quickload:WorkspaceBoardsPageMinimal",modelName:"Organization"}]},"^/w/([^/]+)/home$":{taskName:null,requests:[{url:"/1/organization/:idOrganization?fields=id%2CbillableCollaboratorCount%2Ccredits%2Cdesc%2CdescData%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cmemberships%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts%2Ctype%2Cwebsite&boards=open&boards_count=100&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2CidTags%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boards_sortBy=dateLastActivity&boards_sortOrder=desc&board_membershipCounts=active&board_starCounts=organization&enterprise=true&members=all&member_fields=id&memberships=active&paidAccount=true&paidAccount_fields=billingDates%2CcanRenew%2CcardLast4%2CcardType%2CcontactEmail%2CcontactFullName%2CcontactLocale%2Ccountry%2CdateFirstSubscription%2CexpirationDates%2CinvoiceDetails%2CisVatRegistered%2CixSubscriber%2CneedsCreditCardUpdate%2CpaidProduct%2CpreviousSubscription%2CproductOverride%2Cproducts%2CscheduledChange%2Cstanding%2CstateTaxId%2CtaxId%2CtrialExpiration%2CtrialType%2Czip&tags=true",rootId:":idOrganization",operationName:"quickload:WorkspaceHomePageMinimal",modelName:"Organization"}]},"^/([^/]+)/home$":{taskName:null,requests:[{url:"/1/organization/:idOrganization?fields=id%2CbillableCollaboratorCount%2Ccredits%2Cdesc%2CdescData%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cmemberships%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts%2Ctype%2Cwebsite&boards=open&boards_count=100&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2CidTags%2Cname%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Curl&boards_sortBy=dateLastActivity&boards_sortOrder=desc&board_membershipCounts=active&board_starCounts=organization&enterprise=true&members=all&member_fields=id&memberships=active&paidAccount=true&paidAccount_fields=billingDates%2CcanRenew%2CcardLast4%2CcardType%2CcontactEmail%2CcontactFullName%2CcontactLocale%2Ccountry%2CdateFirstSubscription%2CexpirationDates%2CinvoiceDetails%2CisVatRegistered%2CixSubscriber%2CneedsCreditCardUpdate%2CpaidProduct%2CpreviousSubscription%2CproductOverride%2Cproducts%2CscheduledChange%2Cstanding%2CstateTaxId%2CtaxId%2CtrialExpiration%2CtrialType%2Czip&tags=true",rootId:":idOrganization",operationName:"quickload:WorkspaceHomePageMinimal",modelName:"Organization"}]},"^/u/([^/]+)/boards$":{taskName:null,requests:[{url:"/1/member/:idMember?fields=id&boards=open%2Cstarred&board_fields=id%2Cclosed%2CcreationMethod%2CdateLastActivity%2CdateLastView%2CdatePluginDisable%2CenterpriseOwned%2CidEnterprise%2CidOrganization%2Cname%2CnodeId%2Cprefs%2CpremiumFeatures%2CshortLink%2CshortUrl%2Csubscribed%2Curl&board_memberships=me&board_organization=true&board_organization_fields=id%2Ccredits%2CdisplayName%2CidEnterprise%2Climits%2ClogoHash%2Cname%2Coffering%2Cprefs%2CpremiumFeatures%2Cproducts&boardStars=true&organizations=all&organization_fields=id%2Ccredits%2Climits%2Cprefs%2CpremiumFeatures&organization_memberships=all",rootId:":idMember",operationName:"quickload:MemberBoardsHome",modelName:"Member"}]}},h=e=>!e.dynamicConfig||l(e.dynamicConfig.key)===e.dynamicConfig.value,p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.pathname,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search;arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.document.cookie;let r=e.replace(/\?(.*)$/,""),s=Object.keys(d).find(e=>{if("header"===e)return!1;let t=d[e].requests,s=new RegExp(e);return!!t.find(h)&&s.test(r)}),n=s&&d[s].requests.filter(h),i=s&&d[s].deferredPreloads?d[s].deferredPreloads:[],o=s&&d[s].taskName||null,a=new RegExp(s||"").exec(r)?.[1]||"";RegExp("^/search$").test(e)&&(a=new URLSearchParams(t).get("q")||"");let l=(0,c.x2)(a);return{path:r,preloads:d.header.requests.filter(h).concat(n||[]).filter(e=>{let{graphQLPayload:t}=e;return!t||l}).map(e=>{let{url:t,rootId:r,operationName:s,modelName:n,graphQLPayload:i}=e,l={url:(0,u.J)(t,{rootId:r,idModel:":idMember"===r?"me":a}),operationName:s,modelName:n,queryName:s.replace("quickload:",""),taskName:o};return i&&(l.graphQLPayload={...i,variables:{id:":idMember"===r?"me":a}}),l}),deferredPreloads:i,param:a}}},"./packages/quickload/src/preloadsHash.ts":(e,t,r)=>{"use strict";r.d(t,{P:()=>n,x:()=>s});let s=e=>{let{url:t,graphQLPayload:r}=e;if(!r)return t;{let{operationName:e,variables:t}=r;return`${e}:${JSON.stringify(t)}`}},n={}},"./packages/quickload/src/quickload.ts":(e,t,r)=>{"use strict";r.d(t,{I:()=>f});var s=r("./packages/developer-console-state/index.ts"),n=r("./packages/quickload/src/cleanPreload.ts"),i=r("./packages/quickload/src/getPreloadsFromPath.ts");let o=()=>{let e="";for(let t=0;t<16;t+=1)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e},a=()=>Math.floor(Date.now()/1e3).toString(16)+(o().slice(8)+o());var l=r("./packages/quickload/src/preloadsHash.ts");let c=function(e){try{return JSON.parse(e)}catch(e){return null}},u=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"quickload",a=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,c=new Headers;c.append("Content-Type","application/json; charset=utf-8"),c.append("Accept","application/json"),c.append("X-Trello-Client-Version",window.trelloVersion||"dev-0"),c.append("X-Trello-Operation-Source",i),c.append("X-Trello-Operation-Name",n),a&&(c.append("X-Trello-TraceId",a),c.append("X-B3-TraceId",a),c.append("X-B3-SpanId",o()),c.append("X-Trello-Task",l||"not-implemented")),(async()=>{try{let i=s.t.value.operationNameInUrl,o=await fetch(i&&n?`${e}?operationName=${n}`:e,{method:"POST",headers:c,body:JSON.stringify(t)});if(o.ok){let e=await o.json();r(null,[e,null])}else r([o.status,await o.text()])}catch(e){r([0,"failed to fetch"])}})()},d=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unknown",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"model-loader",i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,l=new XMLHttpRequest,u=s.t.value.operationNameInUrl;l.open("GET",u&&r?`${e}&operationName=${r}`:e,!0),l.setRequestHeader("Accept","application/json,text/plain"),l.setRequestHeader("X-Trello-Client-Version",window.trelloVersion||"dev-0"),l.setRequestHeader("X-Trello-Operation-Source",n),l.setRequestHeader("X-Trello-Operation-Name",r),i&&(l.setRequestHeader("X-Trello-TraceId",i),l.setRequestHeader("X-B3-TraceId",i),l.setRequestHeader("X-B3-SpanId",o()),l.setRequestHeader("X-Trello-Task",a||"not-implemented")),l.onreadystatechange=function(){4===l.readyState&&(200!==l.status?t([l.status,l.responseText]):t(null,[c(l.responseText),l]))},l.send(null)},h=function(e){e in l.P&&delete l.P[e]},p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"preload",r=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;if(!e)return;let i={isLoading:!0,callbacks:[],start:Date.now(),used:!1,url:e,traceId:s},o=(0,l.x)({url:e,graphQLPayload:r});if(l.P[o]=i,r){u(e,r,function(e,t){if(i.isLoading=!1,e){for(let t of(i.error=e,Array.from(i.callbacks)))t(e);return}for(let e of(i.data=t,Array.from(i.callbacks)))e(null,t)},t,"quickload",s,n);return}d(e,function(e,t){let r;if(i.isLoading=!1,e){for(r of(i.error=e,Array.from(i.callbacks)))r(e);return}for(r of(i.data=t,Array.from(i.callbacks)))r(null,t)},t,"quickload",s,n)},m={init(){let e=a(),{preloads:t}=(0,i.m)();for(let{url:r,operationName:s,graphQLPayload:n,taskName:i}of t)p(r,s,n,e,i)},getPreloadsFromPath:i.m,makeUrl:function(e,t){let r,s;s=void 0===t?{}:{...t};let n=[],i=/invite-token-[-a-f0-9]*=([^;]+)/g;for(;void 0!==(r=i.exec(document.cookie)?.[1]);)n.push(unescape(r));if(n.length>0&&(s.invitationTokens=n.join(",")),RegExp("^/1/search(/|$)").test(e)){let e=/dsc=([^;]+)/.exec(document.cookie)?.[1];e&&(s.dsc=e)}let o=[];for(let e in s){let t=s[e];o.push([e,encodeURIComponent(t)].join("="))}return[e,o.join("&")].join("?")},load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=(0,l.x)({url:e}),c=l.P[a];if(void 0!==c)return c.used=!0,c.isLoading?c.callbacks.push(t):t(c.error,c.data),(0,n.l)(c);d(e,t,r,s,i,o)},getPreloadTraceId(){let{preloads:e}=(0,i.m)();for(let{url:t,graphQLPayload:r}of e){let e=(0,l.x)({url:t,graphQLPayload:r});if(e in l.P)return l.P[e].traceId}},clear(){for(let e in l.P)h(e)},markComplete(){this.status="complete"},status:"pending"};m.init();let f=window.QuickLoad=m},"./packages/shared-state/index.ts":(e,t,r)=>{"use strict";r.d(t,{oQ:()=>y,B:()=>d,QY:()=>_,r2:()=>C});var s=r("./packages/storage/index.ts"),n=r("./packages/objects/index.ts");function i(e,t,r){(function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function o(e,t){return e.get(l(e,t))}function a(e,t,r){return e.set(l(e,t),r),r}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")}var c=new WeakMap,u=new WeakMap;class d{constructor(e){!function(e,t,r){var s;(t="symbol"==typeof(s=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?s:s+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"value",void 0),i(this,c,void 0),i(this,u,new Set),this.value=e,a(c,this,e)}setValue(e){let t=this.value;for(let r of("function"==typeof e?this.value=e(this.value):(0,n.Qd)(e)?this.value={...this.value,...e}:this.value=e,o(u,this)))r(this.value,t)}subscribe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(r,s)=>{let i=!0;t.onlyUpdateIfChanged&&((null===r?0:"object"==typeof r||"function"==typeof r?1:0)?(0,n.Qd)(r)&&(i=!(0,n.X3)(r,s)):i=r!==s),i&&e(r,s)};return o(u,this).add(r),()=>{o(u,this).delete(r)}}reset(){this.value=o(c,this),a(u,this,new Set)}}function h(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t,r){return e.set(m(e,t),r),r}function m(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw TypeError("Private element is not present on this object")}var f=new WeakMap,g=new WeakSet;class y extends d{constructor(e,t){let{storageKey:r,session:n=!1,syncAcrossBrowser:i=!0}=t;super(e),function(e,t){h(e,t),t.add(e)}(this,g),function(e,t,r){h(e,t),t.set(e,r)}(this,f,!1);let o=n?s.Y6:s._q,a="function"==typeof r?r():r;m(g,this,v).call(this,o,a,e,i)}}function v(e,t,r,s){let n=e.get(t);null!==n&&n!==r&&this.setValue(n),this.subscribe(r=>{f.get(m(f,this))||e.set(t,r)}),s&&e.listenSyncedAcrossBrowser(e=>{let{key:s,newValue:n}=e;if(s!==t)return;let i=null!==n?JSON.parse(n):r;p(f,this,!0),this.setValue(i),p(f,this,!1)})}var b=r("./node_modules/react/index.js");function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[r,s]=(0,b.useState)(e.value),n=(0,b.useMemo)(()=>e.value,[e.value]);return(0,b.useEffect)(()=>{let r=e.subscribe(s,t);return n!==e.value&&s(e.value),r},[n,e,s,t]),[r,(0,b.useMemo)(()=>e.setValue.bind(e),[e])]}var w=r("./node_modules/@atlaskit/feature-gate-js-client/dist/esm/client/FeatureGates.js");function C(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},[s,i]=(0,b.useState)(()=>t(e.value)),o=(0,b.useRef)(s),a=(0,b.useRef)(!1),l=w.Ay.checkGate("ghost_patch_shared_state_selector"),c=(0,b.useCallback)((e,r)=>{a.current=a.current||void 0!==r;let s=t(e);(0,n.bD)(s,o.current)||(o.current=s,i(s))},[t]);(0,b.useEffect)(()=>{a.current&&c(e.value)},[c]),(0,b.useEffect)(()=>{if(l)return;let t=e.subscribe(c,r);return a.current||c(e.value),()=>{t&&t()}},[l,e,r,c]);let{onlyUpdateIfChanged:u}=r;return(0,b.useEffect)(()=>{if(!l)return;let t=e.subscribe(c,{onlyUpdateIfChanged:u});return a.current||c(e.value),()=>{a.current=!1,t&&t()}},[l,e,u,c]),s}},"./packages/storage/index.ts":(e,t,r)=>{"use strict";r.d(t,{Y6:()=>m,_q:()=>p,yR:()=>g});var s=r("./node_modules/@atlassian/browser-storage-controls/dist/esm/services/web-storage-service/index.js");let n={LOCAL_STORAGE:"localStorage",SESSION_STORAGE:"sessionStorage"};function i(e){let t=!!s.oR?.isAvailable,r=!!s.Rl?.isAvailable;return e===n.LOCAL_STORAGE?t:e===n.SESSION_STORAGE?r:t&&r}var o=r("./packages/browser/index.ts");class a{constructor(){!function(e,t,r){var s;(t="symbol"==typeof(s=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?s:s+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(this,"storage",void 0),this.storage={}}get length(){return Object.keys(this.storage).length}clear(){this.storage={}}getItem(e){return this.storage[e]||null}key(e){return Object.keys(this.storage)[e]||null}removeItem(e){delete this.storage[e]}setItem(e,t){this.storage[e]=t||""}}let l=[...Object.entries({"BoardWarning-":{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores the board limit warnings the user has seen, and the limits of those warnings. Used to determine if a new warning needs to be shown."},HIDE_FRAGMENT_WARNINGS:{category:"functional",createdOn:"2025-05-22",owner:"cross-flow",purpose:"Hides Apollo fragment warnings when running Trello locally"},"NotificationsSeenState-":{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Keeps track of seen notifications/notification groups."},STATSIG_OVERRIDES:{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Local storage for Statsig Gates&Experiments overrides. Can be modified by going to Internal Tools -> Statsig Gates or Internal Tools -> Statsig Experiments and enabling/disabling gates for the gates or modifying values for Experiments. Not sure if the experiments functionality is exposed to users in any way. Value: object "},"accessibleProducts-":{category:"necessary",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Stores the other Atlassian products in use by a user. Doesn't really matter if this is transmitted, as it's a cache of a web request. Value: {}"},action_history_:{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores the undo stack, not normally transmitted, but some actions do call network endpoints selectively depending on the situation."},action_history_undo_stack_:{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:'Stores the "redo" stack (if an action is undone, this stack stores it so it can be redone).'},"announcement-":{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores the read state for taco announcements. Sent in app/src/components/TacoAnnouncements/Announcements.tsx:68"},"attachment-viewer-magnification-preference":{category:"functional",createdOn:"2024-10-08",owner:"cross-flow",purpose:"Persists user magnification preference for the attachment viewer. Value: boolean"},autoJoinQueue:{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"I suspect this may be dead code, I didn't see any usage, but it looks like this relates to the board invites system?"},autoOpenCFFE:{category:"targeting",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Sets if the fullscreen Cross Flow UI should spawn"},boardAdMinifiedState:{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Stores the minified state of discovery ads. Value: bool "},"boardCardComposerSettings-":{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Contains info from card drafts, appears to only be used locally."},"boardCardFilterSettings-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Contains saved filter info."},"boardListComposerSettings-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Used for List Composer drafts."},boardSwitcherLayout:{category:"functional",createdOn:"2025-06-03",owner:"web-eng",purpose:'Stores the layout of the board switcher. Value: "grid" | "list"'},boardSwitcherState:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores the state of the board switcher."},calendar:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Calendar view preferences."},calendarZoomLevel:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Calendar (/boardName/calendar) time period setting that is changed using corresponding dropdown. Seems to be enabled only when having the Calendar powerup + `trello_xf_use_view_for_calendar_powerup` gate ENABLED Value = 'day' | 'week' | 'month' "},"cardBackState-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores the setting for \"Comments & Activity\" panel when the corresponding button is clicked. Value: 'activity' | 'planner' | null"},"client-initialization-method-":{category:"functional",createdOn:"2025-05-23",owner:"cross-flow",purpose:"Stores the feature gate client initialization method"},"collapsed-lists":{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Can be modified in Board '...' menu -> Collapse/Expand all lists or by expanding/collapsing a single list Value: { memberId: { listId: stateNumber, ... }} where stateNumber = 0 (for expanded) | 1 (collapsed)"},"collapsed-popover-section-ids":{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:'In List actions menu: stores the settings for "Automation" and "Change list color" lists being expanded or collapsed. '},custom_action_i18n:{category:"performance",createdOn:"2025-04-16",owner:"web-eng",purpose:"We support loading translations for custom actions from server on-demand, when the client receives a notification that requires it. These translations are stored in the client's local storage."},cut:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Used for Trello clipboard functionality. If a card is cut using the `CMD+X` shortcut, contains the URL of the cut card. Otherwise, the key does not exist."},dateLastViewedNotifications:{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"This value represents the last time the user viewed their notifications (by clicking on the Notifications icon) Value: number corresponding to new Date().getTime()"},developerConsoleState:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"Object representing the developer console settings. The console can be accessed with Internal Tools -> Enable Developer Console. Value: object "},draftComments:{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"Draft comments."},draft_:{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"When editing board description, the draft text is saved here. Values aren't normally transmitted, but can be part of analytics data if an error is caught. Value: string"},dynamicConfigClient:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"`@trello/dynamic-config` initializes a shared state using `@trello/shared-state`. The package also uses `@trello/storage` to read it directly before shared state is initialized, dangerously. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},dynamicConfigOverrides:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"`@trello/dynamic-config` sets and gets values from local storage through the `@trello/storage` wrapper. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},dynamicConfigStarred:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"`@trello/dynamic-config` sets and gets values from local storage through the `@trello/storage` wrapper. Values aren't normally transmitted, but can be part of analytics data if an error is caught. An array of dynamic config names which were marked by a star in Internal Tools -> Statsig Dynamic Configuration Value: string[] "},dynamicConfigUserData:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"`@trello/dynamic-config` sets and gets values from local storage through the `@trello/storage` wrapper. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},"editor-placeholder-hints-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"We have a set of 6 placeholders for the description with tips for the user that we want to rotate through once per card view. We don't want it to change when a user is switching from view to edit on the same card. So, we store the index of last viewed hint in storage and only update it when the current card gets unmounted."},expanded_team_tabs:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Keeps track of expanded state of workspaces in the left sidebar. Value: string[]"},"featureGates-":{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"`@trello/feature-gate-client` sets and gets values from local storage through the `@trello/shared-state` wrapper. This call is not persistent, and is manually persisted/recalled through a call to `@trello/storage` The package also uses `@trello/storage` to read it directly before shared state is initialized, dangerously. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},"fep.feature-flags-sort-order":{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"Stores the setting for FF sort order. Looks like a dev-only thing."},"focus-mode-show-cards":{category:"functional",createdOn:"2025-02-21",owner:"web-eng",purpose:"Used to show/hide cards in focus mode. Value: boolean. "},"focus-mode-show-time":{category:"functional",createdOn:"2025-02-21",owner:"web-eng",purpose:"Used to show/hide time in focus mode. Value: boolean. "},"focus-mode-theme":{category:"functional",createdOn:"2025-03-28",owner:"web-eng",purpose:"Persists the user's focus mode theme"},"global-theme":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Used for the color mode across the app."},home_:{category:"performance",createdOn:"2025-04-16",owner:"web-eng",purpose:"Defines where the user will go after pressing the Home button in Trello."},idCollapsedChecklists:{category:"functional",createdOn:"2024-07-30",owner:"web-eng",purpose:"Used to persis which checklists are collapsed on the card back. Value: boolean"},idLastOrganization:{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:"This is used in copying a board. Might be dead code."},inboxIds:{category:"necessary",createdOn:"2025-04-16",owner:"enterprise",purpose:"Stores inbox IDs for memberId."},"inviteToJiraPermissions-":{category:"necessary",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Stores if a user can invite another to Jira, and if they have any restrictions."},labelState:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"In collapsed mode, the card's label name is hidden. This is controlled by showLabelsState. Might be dead code."},"last-mirrored-data-":{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Stores the value for the last mirrored card."},lastActivity:{category:"performance",createdOn:"2025-04-16",owner:"platform",purpose:"Contains an epoch timestamp for the last time user activity was detected, used to defer network requests when the user is idle."},lastDueDateReminder_:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:'This is set when we open Dates on a card and select a value from the "Set due date reminder" dropdown. Values aren\'t normally transmitted, but can be part of analytics data if an error is caught.a'},lastReloadTimestamp:{category:"necessary",createdOn:"2025-04-16",owner:"platform",purpose:"Stores the last time the page was refreshed. Related code refreshes the page if 5+ mins passed since last refresh. It looks like this value is set using Internal Tools -> Pick a version -> dropdowns for branch and version. Value: Date.now() "},"locale-":{category:"necessary",createdOn:"2025-04-16",owner:"platform",purpose:"Stores the user's locale. Direct localStorage access in packages/bootstrap/src/getPreferredLocale.ts:25"},"memberCohorts-":{category:"performance",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Stores cached member cohorts data. Doesn't seem to be used outside of useFeatureGateClientCustomAttributes.ts, might be dead code. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},"memberEnterpriseData-":{category:"performance",createdOn:"2025-04-16",owner:"enterprise",purpose:"Stores cached enterprise data. Doesn't seem to be used outside of useFeatureGateClientCustomAttributes.ts, might be dead code. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},"memberState-":{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"Stores user preferences like 'showSuggestions': bool"},"mirror-tab-":{category:"functional",createdOn:"2025-05-13",owner:"cross-flow",purpose:"Stores the tab of the mirror card popover."},mobilePromptClosed:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores the date when the mobile app download prompt banner was dismissed. We don't show this banner again for the next 24 hours. Values aren't normally transmitted, but can be part of analytics data if an error is caught. Value: Date.now()"},nocontext:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"When this key is set to true, right click on a card opens the system context menu instead of card context menu. I don't see any place where this value is written to localStorage. This might be a developer-only option."},"notificationFilterState-":{category:"functional",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Preferences for filtering notifications."},notification_lock_:{category:"necessary",createdOn:"2025-04-16",owner:"platform",purpose:"This is related to browser notification API. Probably a synchronization mechanism for cases when the user has Trello opened in browser and a desktop app, and a notification arrives."},"onboardingBoardUrl-":{category:"functional",createdOn:"2025-03-19",owner:"cross-flow",purpose:"Stores an onboarding redirect url for the member"},otmd:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"Related to one time messages functionality. Value: string[]"},"personalProductivityLocalOverride-":{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Stores the setting from Personal Productivity Toggle. Might be a dev-only thing, but not 100% sure."},"planner:custom_view":{category:"necessary",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Persists which view to show when the user opens the planner."},"planner:weekend_view":{category:"necessary",createdOn:"2025-03-19",owner:"cross-flow",purpose:"Whether the user prefers to show weekends in the planner view. Value: boolean"},postOfficeEnvironment:{category:"necessary",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Stores the post office environment. Looks like a dev-only setting, but not 100% sure. Value: 'local' | 'production' | 'staging'"},"recentBoardsState-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores recent boards to use them for suggestions, for example in board switcher or link picker."},"recentCardsState-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores recent cards to suggest them when linking a card."},recentMentions:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores recent mentions to use them in a mention dialog."},recentlyFlaggedInvites:{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Used to track last time we showed a flag for a invite accepted notification. Values aren't normally transmitted, but can be part of analytics data if an error is caught."},recentlyUsedFeatures:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Stores feature usage in LocalStorage and for a delayed preload on app entry only if the feature has been used by that user within a given time frame (3 days by default)."},reloadedToUpdate:{category:"necessary",createdOn:"2025-04-16",owner:"platform",purpose:"This is needed for reload-to-update functionality Sent in packages/client-updater/src/sendReloadedToUpdateEvent.ts:19"},sandboxState:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:"This seems to be a dev-only preference for Apollo."},"selected-rovo-site-id":{category:"functional",createdOn:"2025-05-09",owner:"web-eng",purpose:"Stores the selected site id for Rovo."},serverTimeDelta:{category:"performance",createdOn:"2025-04-16",owner:"platform",purpose:"Holds the difference between the current system epoch, and the epoch returned from the last API request. Updated when API requests are returned. (This appears to be older, backbone-related code)"},showDetails:{category:"performance",createdOn:"2025-04-16",owner:"platform",purpose:"Stores the setting for Show/Hide Details button in cardback Activity."},"sidebarBoardOrderState-":{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Stores the board sort order (alphabet, recent) in the sidebar."},sidebar_boardslist_full_show_collapsed_:{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Stores the setting for showing collapsed boards in BoardsList. Value: bool Sent in app/src/components/WorkspaceNavigation/BoardsList.tsx:197"},"split-screen-configuration":{category:"necessary",createdOn:"2025-04-16",owner:"web-eng",purpose:'Contains information about the split screen mode. If you go to a board and click "planner" and/or "inbox" at the bottom of the page, the values in the storage update accordingly.'},"splitScreenOnboardingMessageDismissal-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Gets set after the 'split-screen-onboarding' one time message is dismissed. Value: Date.now()"},"starred-feature-flags":{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:'Stores the FFs that we mark as starred in "Statsig Feature Gates"'},"tacoShowFlags-":{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Defines the style of taco announcement that is going to be shown when the user interacts with the crouched taco Icon. Value: { tacoExpires: date.toString(), tacoStyle: 'maintenance' | 'normal' }"},tacoTimeMs:{category:"functional",createdOn:"2025-04-16",owner:"web-eng",purpose:"Used to fast forward the taco announcements polling rate. Dev only"},unsupportedBrowserBannerLastDismissed:{category:"functional",createdOn:"2025-04-16",owner:"platform",purpose:'Contains Date string of the last time the "Unsupported browser version" banner was dismissed. When this date is older than 1 week, the banner is displayed again. Values aren\'t normally transmitted, but can be part of analytics data if an error is caught. Value: Date.toISOString()'},useWebSockets:{category:"necessary",createdOn:"2025-04-16",owner:"platform",purpose:"Persists a value to enable or disable web sockets. It's pass through to the window, but doesn't appear to actually do anything other than send a message to the console, and persist the value? Value: 'yes' | 'no'"},userHasSite:{category:"necessary",createdOn:"2025-04-16",owner:"cross-flow",purpose:"Is set to true when the response from /xpsearch-aggregator returns non-zero length for any of jiraSites/confluenceSites/atlasWorkspaces. Is part of a condition if an Atlassian Account login should be rendered. Value: bool"},"workspaceNavigation-":{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Describes the state of the sidebar (can be changed with the [ hotkey) Value: { view: bool, expandedViewStatus: string }"},"workspaceViewDismissedDefaultView-":{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Settings for workspace views."},"workspaceViewNavigationState-":{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"Settings for workspace views."},yourCardsSortView:{category:"functional",createdOn:"2025-04-16",owner:"enterprise",purpose:"/u//cards -- defines how the cards will be sorted: by board or by due date. Possible values: 'board' | 'date'"}}).filter(e=>{let[,t]=e;return"necessary"===t.category}),...Object.entries({newFeaturesSeen:{category:"functional",createdOn:"2025-04-08",owner:"web-eng",purpose:"Stores the seen state of new features."},searchConfigurationSession:{category:"functional",createdOn:"2025-04-08",owner:"cross-flow",purpose:"Stores cached cross-product search configuration."},searchSessionId:{category:"functional",createdOn:"2025-04-08",owner:"cross-flow",purpose:"Used in calculating a search journey."},"trello.currentUserActivityStatus":{category:"necessary",createdOn:"2025-04-08",owner:"platform",purpose:"Tracks the active/idle state of the user for the page."},typeof_:{category:"necessary",createdOn:"2025-04-08",owner:"enterprise",purpose:"Used to cache view data to avoid loading it multiple times"}}).filter(e=>{let[,t]=e;return"necessary"===t.category})].map(e=>{let[t]=e;return t}),c={},u=e=>{if(e in c)return c[e];let t=l.some(t=>e.startsWith(t));return c[e]=t,t};function d(e,t,r){var s;return(t="symbol"==typeof(s=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?s:s+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class h{constructor(e){d(this,"storage",void 0),d(this,"listeners",void 0),d(this,"errorListeners",void 0),d(this,"listenersSyncedAcrossBrowser",void 0),d(this,"storageSource","window"),d(this,"storageKind",void 0),d(this,"LISTENER_IGNORABLE_KEY_PREFIXES",/^(awc\.)/),d(this,"onStorage",e=>{let{key:t,oldValue:r,newValue:s}=e;!t||t.match(this.LISTENER_IGNORABLE_KEY_PREFIXES)||this.broadcastChangeFromOtherInstance({key:t,oldValue:r,newValue:s})}),d(this,"getAllKeys",()=>{let e="window"===this.storageSource?this.storage:this.storage.storage;return e?Object.keys(e):[]}),this.listeners=new Set,this.errorListeners=new Set,this.listenersSyncedAcrossBrowser=new Set,this.storageKind=e,(0,o.oi)()&&!function(e){let t;try{t=window[e];let r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!!(e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&t&&0!==t.length)}}(e)?(this.storageSource="memory",this.storage=new a):i(e)?(this.storageSource="atlassian",e===n.SESSION_STORAGE?this.storage=s.Rl:this.storage=s.oR):(this.storageSource="window",this.storage=window[e]),window.addEventListener("storage",this.onStorage)}listen(e){this.listeners.add(e)}addErrorListener(e){this.errorListeners.add(e)}removeErrorListener(e){this.errorListeners.delete(e)}listenSyncedAcrossBrowser(e){this.listenersSyncedAcrossBrowser.add(e),this.listen(e)}unlisten(e){this.listeners.delete(e),this.listenersSyncedAcrossBrowser.delete(e)}broadcastLocalChange(e){this.listeners.forEach(t=>{t(e)})}broadcastError(e){this.errorListeners.forEach(t=>{t(e)})}broadcastChangeFromOtherInstance(e){this.listenersSyncedAcrossBrowser.forEach(t=>{t(e)})}ensureStorageSource(){i(this.storageKind)?"window"===this.storageSource&&(this.storageSource="atlassian",this.storageKind===n.SESSION_STORAGE?this.storage=s.Rl:this.storage=s.oR):"atlassian"===this.storageSource&&(this.storageSource="window",this.storage=window[this.storageKind])}isEnabled(){return!!this.storage}set(e,t){try{if(this.ensureStorageSource(),this.storage){let r=this.getRaw(e),s=JSON.stringify(t);"atlassian"===this.storageSource&&u(e)?this.storage.setStrictlyNecessaryItem(e,s):this.storage.setItem(e,s),this.broadcastLocalChange({key:e,oldValue:r,newValue:s})}}catch(t){console.warn(t),this.broadcastError({key:e,error:t})}}get(e){let t=null,r=this.getRaw(e);if(r)try{t=JSON.parse(r)}catch(e){console.warn(e)}return t}getRaw(e){return this.storage?this.storage.getItem(e):null}unset(e){this.storage&&null!==this.getRaw(e)&&this.storage.removeItem(e)}}let p=new h(n.LOCAL_STORAGE),m=new h(n.SESSION_STORAGE);var f=r("./node_modules/react/index.js");let g=(e,t)=>{let[r,s]=(0,f.useState)(t),n=(0,f.useCallback)(t=>{s(t),null===t?p.unset(e):p.set(e,t)},[e]);return(0,f.useEffect)(()=>{s(p.get(e)??r)},[]),[r,n]}}},e=>{e(e.s="./packages/quickload/src/quickload.ts")}]); //# sourceMappingURL=quickload.7de261a5b9f38943d721.js.map